OnKeyDown - ScriptObject
From Creation Kit
Event OnKeyDown(int keyCode)
- keyCode: The Scan Code of a key press to listen for.
Event OnKeyDown(int keyCode) If (keyCode == 160) Debug.Trace("The left shift key has been pressed.") ElseIf (keyCode == 161) Debug.Trace("The right shift key has been pressed.") Else Debug.Trace("The keycode '"+keyCode+"' has been pressed.") EndIf EndEvent
- If multiple keys are registered, you'll want to differentiate in the event body as demonstrated above. If only one key will be registered for the form, such differentiation is not necessary.