Trigger "Shift" key within a patch

Oct 27, 2007 at 6:08pm

Trigger "Shift" key within a patch

Is there a way to send a “Shift” key message from within Max/MSP? I’ve looked at all the key and modifier objects but they all seem to only work if you physically press the key on the keyboard. What I want to do is trigger the “Shift” from within a patcher.

#34346
Oct 27, 2007 at 8:06pm

Tricky.

To simulate keyboard events, the most common approach is AppleScripts (having turned on “Enable GUI Scripting” in the AppleScript Utility). But I’m not sure if any of the modifier keys (shift, ctrl, cmd, opt, caps lock) by itself will trigger anything, in AppleScript or anywhere else.

I would have known how to write an external that did this in Classic Mac OS, but the particular API calls I have in mind died with OS X.

#115729
Oct 29, 2007 at 7:38am

Thanks Peter,

I’ll knock around a bit with AppleScript and the [shell] object and see if I can’t make that go. What I’m wanting to do is make it so that when the user clicks the mouse button in a very specific location of the patcher, it automatically engages the “Shift” key so that they get a “shift-click” without actually pressing the “Shift” key itself. It may end up being more trouble than it’s worth, but what the hey…

#115730
Oct 31, 2007 at 5:30pm

Brian Shepard schrieb:
> What I’m wanting to do is make it so that when the user clicks the
> mouse button in a very specific location of the patcher, it
> automatically engages the “Shift” key so that they get a
> “shift-click” without actually pressing the “Shift” key itself. It
> may end up being more trouble than it’s worth, but what the hey…

If its inside Max you won’t need that. Just do directly what the
shift-click supposed to do (No idea what it should be by the way, but
Max does understand a lot of messages…)

Stefan


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

#115731

You must be logged in to reply to this topic.