Returns the ASCII code of a key that has been pressed, or -1 if no key has been pressed.
At release, this has not been properly verified, and seems not to work at all on Windows.
![]() |
Note |
---|---|
This opcode can also be written as sense. |
Here is an example of the sensekey opcode. It uses the files sensekey.orc and sensekey.sco.
Example 345. Example of the sensekey opcode.
/* sensekey.orc */ ; Initialize the global variables. sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 ; Instrument #1. instr 1 k1 sensekey printk2 k1 endin /* sensekey.orc */
/* sensekey.sco */ ; Play Instrument #1 for thirty seconds. i 1 0 30 e /* sensekey.sco */
Here is what the output should look like when the "q" button is pressed...
q i1 357967744.00000