Game Development Community

What are the "action" values for special keys like ESC, F1, cursor-left, etc.

by Andy H · in Torque 2D Beginner · 03/29/2013 (5:48 pm) · 2 replies

I am a total beginner, and I am trying to setup some keyboard handling functions. I am using the ActionMap::bindCmd() method, and the second argument in this method is the "action" or the key that is being pressed.

This is really easy when you are responding to a regular letter key, just enter "a" or "k". But how do I respond to some of the funky keyboard keys: ESC, F1..F10, CURSOR keys, etc. The documentation says "see Action Table below", but there is no Action Table in the document!

Any ideas?

Thanks

About the author

Recent Threads


#1
03/29/2013 (6:58 pm)
I believe it's the the same as TGB, as I doubt that the action map settings have changed at all.. So, in order to use F1, you encapsulate F1 in quotes just like a letter. Ex: "F1"
Here's a more or less complete list:
backspace end win_apps tilde tab home cmd minus return left opt equals enter up lopt lbracket shift right ropt rbracket ctrl down numlock backslash alt print scrolllock semicolon pause insert rshift apostrophe capslock delete lcontrol comma escape help rcontrol period space win_lwindow lalt slash pagedown win_rwindow ralt lessthan pageup

numpad0 numpad5 numpad9 numpadminus numpad1 numpad6 numpadadmult numpaddecimal numpad2 numpad7 numpadadd numpaddivide numpad3 numpad8 numpadsep numpadenter numpad4

f1 f7 f13 f19 f2 f8 f14 f20 f3 f9 f15 f21 f4 f10 f16 f22 f5 f11 f17 f23 f6 f12 f18 f24
#2
03/29/2013 (7:19 pm)
Use the source, Luke....

actionmap.cc @ about line 1720.