Functions and classes relating to to user input.
class/ActionMap class/LeapMotionFrame class/RazerHydraFrame
Input events come from the OS, are translated in the platform layer and then posted to the game. By default the game then checks the input event against a global ActionMap (which supercedes all other action handlers). If there is no action specified for the event, it is passed on to the GUI system. If the GUI does not handle the input event it is passed to the currently active (non-global) ActionMap stack.
Example: the user presses the ~
(tilde) key, which is bound in the global ActionMap to toggleConsole.
This causes the console function associated with the bind to be executed, which in this case is toggleConsole, resulting in the console output window being shown. If the key had not been bound in the global map, it would have passed to the first gui that could have handled it, and if none did, it would pass to any game actions that were bound to that key.
The following table represents all keyboard, mouse, and joystick input events available to stock Torque 3D. It should be noted that letter and number keys directly correlate to their mapping. For example "a" is literally the letter a. The button0, button1, and button2 are the most commonly used input mappings for left mouse button, right mouse button, and middle mouse button (respectively).
Keyboard General Events:
backspace | end | win_apps | tilde |
tab | home | cmd | minus |
return | left | equals | enter |
up | lopt | lbracket | opt |
shift | right | ropt | rbracket |
ctrl | down | numlock | backslash |
alt | scrolllock | semicolon | |
pause | insert | rshift | apostrophe |
capslock | delete | lcontrol | comma |
escape | help | rcontrol | period |
space | win_lwindow | lalt | slash |
pagedown pageup |
win_rwindow |
ralt |
lessthan |
Note
All general keys can be bound by simply using the key... ex. "u" will trigger the u key response.
Keyboard Numpad Events:
numpad0 | numpad5 | numpad9 | numpadminus |
numpad1 | numpad6 | numpadadmult | numpaddecimal |
numpad2 | numpad7 | numpadadd | numpaddivide |
numpad3 numpad4 |
numpad8 |
numpadsep |
numpadenter |
Keyboard Function Key Events:
f1 | f7 | f13 | f19 |
f2 | f8 | f14 | f20 |
f3 | f9 | f15 | f21 |
f4 | f10 | f16 | f22 |
f5 | f11 | f17 | f23 |
f6 | f12 | f18 | f24 |
Joystick/Mouse Events:
button0 | button8 | button16 | button24 |
button1 | button9 | button17 | button25 |
button2 | button10 | button18 | button26 |
button3 | button11 | button19 | button27 |
button4 | button12 | button20 | button28 |
button5 | button13 | button21 | button29 |
button6 | button14 | button22 | button30 |
button7 | button15 | button23 | button31 |
Joystick/Mouse Axes:
xaxis yaxis |
zaxis rxaxis |
ryaxis rzaxis |
slider |
Joystick POV:
xpov | dpov | xpov2 | dpov2 |
ypov | lpov | ypov2 | lpov2 |
upov | rpov | upov2 | rpov2 |
Miscellaneous Events:
anykey | nomatch |