Right now the MAXScript access to keyboard is limited to just modifier keys:
- keyboard.shiftPressed
- keyboard.controlPressed
- keyboard.altPressed
- keyboard.escPressed
I propose that there is also a new readonly parameter: keyboard.otherKeyPressed
This parameter will return true if any key other than SHIFT, CONTROL, ALT and ESC is pressed.
Why would you want this?
I built a collection of MacroScripts that I wanted to include a default Alternate Action that would, instead of running the action, take the user to a documentation URL for the action. So I arbitrarily chose the SHIFT key. This way, if the user SHIFT-CLICKS the macroscript in the menu bar, the user will go to the documentation. There is one problem with this: if the user assigns a keyboard shortcut that uses SHIFT, the function won't run as the user expects.
If this new parameter is added, you can do something like this in a MacroScript without worrying about colliding with keyboard shortcuts (which require more than a modifier key):
if (keyboard.shiftPressed AND NOT keyboard.otherKeyPressed) then (
--do alternate action
) else (
--do primary function
)