Forums > MaxMSP

how to define a certain key of the keyboard

November 1, 2006 | 3:34 pm

how to define one or more certain keys from the keyboard to start somehting with a bang?
I tried "key", but it is always for all keys.

Thanks


November 1, 2006 | 3:47 pm

key returns numbers which correspond to keys. Use the number box to
determine the right number and select to make a bang(s). see for
tutorials examples

falk

Am 01.11.2006 um 16:34 schrieb luckyforest:

>
> how to define one or more certain keys from the keyboard to start
> somehting with a bang?
> I tried "key", but it is always for all keys.
>
> Thanks
>
>


November 1, 2006 | 5:08 pm

max v2;
#N vpatcher 10 59 610 459;
#P toggle 125 217 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 125 181 38 196617 sel 32;
#P newex 125 147 40 196617 key;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P pop;


November 2, 2006 | 3:28 pm

Better yet, connect the ASCII output to a sprintf %c object. This will change the ASCII number into a character. Then use route or select to choose the apporpriate letter you want. Note this will not work for space, tab, and backspace — you need to use the select for that. Capital letters also work.

Also remember you have *keyup* as well, to determine when you release a key.

–CJ


Viewing 4 posts - 1 through 4 (of 4 total)