how to define a certain key on the keyboard?

luckyforesthz@yahoo.com's icon

I forget how to define a key to be a switch, for example, I want the "space" to be the switch instead of the mouse.

can somebody tell?

Many Thanks!

Jean-Francois Charles's icon
jml's icon

i'm assuming that by "be a switch" you mean to switch the state of a toggle box, for example...
correct me if i am wrong.

key
->
sel # (test this out w/ a numbox if necessary)
->
toggle

jl

Mr. Banshee's icon

Lucky Forest,
Is this what you wanna do?

Max Patch
Copy patch and select New From Clipboard in Max.

-chuck

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Drsbaitso's icon

you can use the following abstraction to select a key based on the abstractions argument.

Max Patch
Copy patch and select New From Clipboard in Max.

luckyforesthz@yahoo.com's icon

Thank you. but how to convert the code below you gave into maxmsp patch?

Quote: DrSbaitso wrote on Thu, 19 October 2006 08:17
----------------------------------------------------
> you can use the following abstraction to select a key based on the abstractions argument.
>
> #P window setfont "MS Sans Serif" 10.;
> #P window linecount 1;
> #P newex 89 44 68 8585226 loadmess $1;
> #P newex 37 110 40 8585228 key;
> #P newex 89 110 27 8585228 i;
> #P outlet 37 161 15 0;
> #P newex 37 135 62 8585228 select;
> #P newex 89 87 40 8585228 atoi;
> #P connect 5 0 0 0;
> #P connect 3 0 1 1;
> #P connect 0 0 3 0;
> #P connect 1 0 2 0;
> #P connect 4 0 1 0;
> #P window clipboard copycount 6;
>
----------------------------------------------------

Stefan Tiedje's icon

luckyforest wrote:
> Thank you. but how to convert the code below you gave into maxmsp
> patch?

You are so new to Max, that I am certain you do have a version later
than 4.5.5:

Copy the text part from the e-mail, switch to Max, go through all the
menus and search for somthing which would make you think: "that might
work" then try, if it doesn't, search on, you'll find it...
(if you have an older version it would not work, the upgrade from 4.5 is
free...)

In general I'd suggest to try harder. Beside searching the menus, you
can search the documentation. Wait at least 30 minutes before you post a
question (try to find the solution within that time), especially the
other question you sent regarding a standard key on the keyboard, make
me believe you are very new to computers in general. Most things will
fold up if you try hard and its MUCH, MUCH MORE FUN to find out yourself
than getting an answer from the list. And what you learn by finding the
solution yourself, will remain longer in your memory as well...

You are welcome, have FUN with Max...

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

seejayjames's icon

Hello, please see my additional main post / patch about getting keyboard information. Hopefully it will be useful to anyone wanting to use the keyboard (either key down, key up, or both) information..... pretty much every key is represented, and easily understood.

Enjoy!

-CJ