SetOnKeyDownEventHandler
From GECK
A function added by the JIP NVSE Plugin.
Description
Sets/removes the specified UDF Script as a handler that will be invoked in the event the specified KeyID is pressed.
When invoked, the script is passed with a single argument: the pressed Key ID.
Syntax
SetOnKeyDownEventHandler handlerScript:ref setORremove:1/0 keyID:int
Example
SetOnKeyDownEventHandler OnKeyDownUDF 1 14
Sets the OnKeyDownUDF script as a handler to be invoked whenever Backspace is pressed.
SetOnKeyDownEventHandler OnKeyDownUDF 0 14
Removes the OnKeyDownUDF script as a handler of the above.
Handler Script
A skeleton handler script for this event:
scn OnKeyDownUDF int iKeyID begin Function {iKeyID} (code) end
Notes
- This event still runs even if the key has been disabled using DisableKey.