» Back To Index
The <hotkey> node
Function
The hotkey node makes it possible to link with certain keys of the keyboard, functionalities that have been defined by LUA scripting codes.
General syntax
<hotkey
name=""
script=""
key="KEY_SPACE" />
hotkey element
hotkey is the xml tag that defines a hotkey node.
Attributes:
- name - [STR127] - name of the node. This name will make it possible to refer this node throughout
the XML script.
- key: - [ENUM] - Keyboard key that will launch the script:
- KEY_F1
- KEY_F2
- KEY_F3
- KEY_F4
- KEY_F5
- KEY_F6
- KEY_F7
- KEY_F8
- KEY_F9
- KEY_F10
- KEY_F11
- KEY_F12
- KEY_UP
- KEY_DOWN
- KEY_LEFT
- KEY_RIGHT
- KEY_SPACE
- KEY_DELETE
- KEY_INSERT
- KEY_END
- KEY_HOME
- KEY_A
- KEY_B
- KEY_C
- KEY_D
- KEY_E
- KEY_F
- KEY_G
- KEY_H
- KEY_I
- KEY_J
- KEY_K
- KEY_L
- KEY_M
- KEY_N
- KEY_O
- KEY_P
- KEY_Q
- KEY_R
- KEY_S
- KEY_T
- KEY_U
- KEY_V
- KEY_W
- KEY_X
- KEY_Y
- KEY_Z
- KEY_0
- KEY_1
- KEY_2
- KEY_3
- KEY_4
- KEY_5
- KEY_6
- KEY_7
- KEY_8
- KEY_9
- KEY_NUMPAD_0
- KEY_NUMPAD_1
- KEY_NUMPAD_2
- KEY_NUMPAD_3
- KEY_NUMPAD_4
- KEY_NUMPAD_5
- KEY_NUMPAD_6
- KEY_NUMPAD_7
- KEY_NUMPAD_8
- KEY_NUMPAD_9
- KEY_ADD
- KEY_SUBTRACT
- KEY_MULTIPLY
- KEY_DIVIDE
- script - [STR255] - name of the script to be executed for this hotkey.
This name can whether refer to a script node or to an access path to a script file.
Example
This piece of code displays a dialog box when the user presses the SPACE key.
<script name="hello_LUA" run_mode="ASYNCHRONOUS" >
<raw_data><![CDATA[
HYP_MsgBox( "Test", "Hello World!" );
]]></raw_data>
</script>
<hotkey name="hello" key="KEY_SPACE" script="hello_LUA" />