[Csnd] sensekey
Date | 2011-12-09 16:50 |
From | k_o_m_p |
Subject | [Csnd] sensekey |
Hello, when using senseky there is a difference between the ASCII numbers sensekey sends using qutecsound or using the terminal. qutecsound recognizes arrow up/down keys as ASCII numbers 30 and 31 while the terminal sends two numbers 27 and 91 for arrow up and the same 27 and 91 for arrow down. Does anyone knows an explanation for this? Is this a shell configuration issue? I am using Csound version 5.14 (float samples) Nov 7 2011 and qutecsound 0.6.1 on OS 10.6 running csound on a tcsh shell. Here's the csound code I used to test it. Best, Luis <CsoundSynthesizer> <CsOptions> -odac -d -m0 </CsOptions> <CsInstruments> instr 1 kres, kkeydown sensekey ktrig trigger kkeydown, .5, 0 printf "\n\n\t key number: %d", ktrig, kres endin </CsInstruments> <CsScore> i1 0 36000 </CsScore> </CsoundSynthesizer> -- -- http://luisantunespena.eu |
Date | 2011-12-09 17:43 |
From | Tito Latini |
Subject | Re: [Csnd] sensekey |
Attachments | None |
Date | 2011-12-09 17:47 |
From | Andres Cabrera |
Subject | Re: [Csnd] sensekey |
Hi, And CsoundQt does its own handling of keyboard events, not through the shell, so it can interpret the keys correctly (and you can configure whether you want automatic repetitions or not). Cheers, Andres On Fri, Dec 9, 2011 at 5:43 PM, Tito Latini |
Date | 2011-12-09 17:48 |
From | Tito Latini |
Subject | Re: [Csnd] sensekey |
Attachments | None |
Date | 2011-12-09 22:15 |
From | k_o_m_p |
Subject | Re: [Csnd] sensekey |
Thanks Tito and Andreas for the explanation. Now all is clear. Best, Luís Am 09.12.11 18:47, schrieb Andres Cabrera: > Hi, > > And CsoundQt does its own handling of keyboard events, not through the > shell, so it can interpret the keys correctly (and you can configure > whether you want automatic repetitions or not). > > Cheers, > Andres > > On Fri, Dec 9, 2011 at 5:43 PM, Tito Latini |
Date | 2011-12-09 23:16 |
From | Tito Latini |
Subject | Re: [Csnd] sensekey |
Attachments | None |
Date | 2011-12-10 11:26 |
From | k_o_m_p |
Subject | Re: [Csnd] sensekey |
Thank you Tito! Very usefull information! I was not aware of all these possibilities! Luís Am 10.12.11 00:16, schrieb Tito Latini: > We can use `sensekey' with all the keys that we want, also from the > console. For example, under X, we can use the `xmodmap' utility for > modifying keymaps. First we save the default > > xmodmap -pke> default.map > > Now we modify the map for the arrow up/down keys: > > xmodmap -e 'keysym Up = cent' -e 'keysym Down = sterling' > > We control the autorepeat with > > xset r on # autorepeat on > > or > > xset r off # autorepeat off > > and finally start csound with an instr that uses the sensekey opcode. > Now the printed codes are 162 and 163. Good. > Let's remember us to restore the default: > > xmodmap default.map > > The file /usr/include/X11/keysymdef.h contains the names of all the > keysyms (with a XK_ prefix). The keysyms of the codes from 128 to 255 are > > sed -n '/U+00A0/,/U+00FF/s/XK_//p' /usr/include/X11/keysymdef.h|awk '{print $2}' > > tito > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > > |