AnsweredAssumed Answered

Pass keystroke to script

Question asked by MattLeach on Aug 10, 2012
Latest reply on Aug 10, 2012 by MattLeach

I have a button on my layout to add a note into a second table. What i would like to do it change the way the button behanves based on a keystroke.


For example, if i hold Ctrl and click the button, i would like to be able to capture that keystroke so the script can check for that key and perform additional steps.


Currently, i have the button setup to pass a few parameters to the script:


List ( Get ( AccountName ) ; Get ( ActiveModifierKeys ) )


The first two steps of the called script separate the parameters into variables:


Set Variable [$user; Value:GetValue ( Get ( ScriptParameter ) ; 1 )]

Set Variable [$key; Value:GetValue ( Get ( ScriptParameter ) ; 2 )]


It appears that no matter what key i press while clicking, the $key value stays null so im assuming im going about this incorrectly.. What would be the best approach for something like this to work?