Forums > MaxMSP

key commands in patches

Jul 29 2009 | 2:09 pm

Hi Guys,

While attempting to add keystroke control to every feature in my program project, I have run into some conflicts.
I have noticed that, in presentation mode, when a number, slider object, or bpatcher (with slider) is selected with the mouse, you can use the up and down arrow keys to change the numbers (or position of the slider/bpatcher). This is handy, but I would like to be able to use the keyboard to make the selection as well as the mouse. In other words, if I press "v" then the volume slider gets selected and I can then use the arrows to adjust it.

***I have a complicated way to do this that works, but it sometimes conflicts with the built-in function. i.e. if something is "selected" with the mouse and something is selected with the keyboard, they both move.

In another situation, I have a bpatcher with the horizontal slider activated making it a sliding window of buttons. I would like to disable the arrow key function without having to lose the slider function altogether.

Jul 29 2009 | 3:25 pm

Have you tried using the "select" message. This will enable you to type directly into number boxes using the numeric or arrow keys. You could also use the tab output to trigger selecting the next ui object. In the first example use the 1/2/3 key on your keyboard to select an initial object and then tab between them. The second example shows how you can use the tab button to remove focus from an object using a scripting hack.


— Pasted Max Patch, click to expand. —
Aug 06 2009 | 2:30 pm

You can disable the mouse input of any UI object in the inspector…

Aug 06 2009 | 3:23 pm

it somehow makes sense that numbox listens to up, down,
and return (as well as to numbers) since max v. 3, but
it is sometimes a pita that you always have to take care
that no numberboxes may be selected when you want to use
an arrow key with something else.

thats not what you wanted to hear, but one possible
solution is to create custom numberboxes and a custom
multislider, which do not use the arrow keys by default,
and use those instead of the maxmsp ones.



Aug 06 2009 | 5:02 pm

Thanks guys, I think this gives me enough to finish the task of making my patch useable for the one handed musician.

Having fun!


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

Forums > MaxMSP