![Logo](../../rorlogo.png) |
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
35 const char*
mOISDeviceType[6] = {
"Unknown Device",
"Keyboard",
"Mouse",
"JoyStick",
"Tablet",
"Other Device"};
42 {
"COMMON_OUTPUT_POSITION",
EV_COMMON_OUTPUT_POSITION,
"Keyboard H",
_LC(
"InputEvent",
"write current position to log (you can open the logfile and reuse the position)")},
47 {
"COMMON_SCREENSHOT_BIG",
EV_COMMON_SCREENSHOT_BIG,
"Keyboard EXPL+CTRL+SYSRQ",
_LC(
"InputEvent",
"take a big screenshot (3 times the screen size)")},
50 {
"COMMON_FOV_LESS",
EV_COMMON_FOV_LESS,
"Keyboard EXPL+NUMPAD7",
_LC(
"InputEvent",
"decreases the current FOV value")},
51 {
"COMMON_FOV_MORE",
EV_COMMON_FOV_MORE,
"Keyboard EXPL+CTRL+NUMPAD7",
_LC(
"InputEvent",
"increase the current FOV value")},
52 {
"COMMON_FOV_RESET",
EV_COMMON_FOV_RESET,
"Keyboard EXPL+SHIFT+NUMPAD7",
_LC(
"InputEvent",
"reset the FOV value")},
53 {
"COMMON_SAVE_TERRAIN",
EV_COMMON_SAVE_TERRAIN,
"Keyboard EXPL+ALT+SHIF+CTRL+M",
_LC(
"InputEvent",
"save the currently loaded terrain to a mesh file")},
55 {
"COMMON_FULLSCREEN_TOGGLE",
EV_COMMON_FULLSCREEN_TOGGLE,
"Keyboard EXPL+ALT+RETURN",
_LC(
"InputEvent",
"toggle between windowed and fullscreen mode")},
62 {
"COMMON_TRUCK_REMOVE",
EV_COMMON_TRUCK_REMOVE,
"Keyboard EXPL+CTRL+SHIFT+DELETE",
_LC(
"InputEvent",
"delete current truck")},
65 {
"COMMON_PRESSURE_LESS",
EV_COMMON_PRESSURE_LESS,
"Keyboard LBRACKET",
_LC(
"InputEvent",
"decrease tire pressure (note: only very few trucks support this)")},
66 {
"COMMON_PRESSURE_MORE",
EV_COMMON_PRESSURE_MORE,
"Keyboard RBRACKET",
_LC(
"InputEvent",
"increase tire pressure (note: only very few trucks support this)")},
67 {
"COMMON_LOCK",
EV_COMMON_LOCK,
"Keyboard EXPL+L",
_LC(
"InputEvent",
"connect hook node to a node in close proximity")},
68 {
"COMMON_AUTOLOCK",
EV_COMMON_AUTOLOCK,
"Keyboard EXPL+ALT+L",
_LC(
"InputEvent",
"unlock autolock hook node")},
69 {
"COMMON_ROPELOCK",
EV_COMMON_ROPELOCK,
"Keyboard EXPL+CTRL+L",
_LC(
"InputEvent",
"connect a rope to a node in close proximity")},
73 {
"COMMON_RESET_TRUCK",
EV_COMMON_RESET_TRUCK,
"Keyboard I",
_LC(
"InputEvent",
"reset truck to original starting position")},
92 {
"COMMON_HIDE_GUI",
EV_COMMON_HIDE_GUI,
"Keyboard EXPL+U",
_LC(
"InputEvent",
"hide all GUI elements")},
99 {
"COMMON_NETCHATMODE",
EV_COMMON_NETCHATMODE,
"Keyboard EXPL+CTRL+U",
_LC(
"InputEvent",
"toggle between net chat display modes")},
100 {
"COMMON_TOGGLE_STATS",
EV_COMMON_TOGGLE_STATS,
"Keyboard EXPL+F",
_LC(
"InputEvent",
"toggle Ogre statistics (FPS etc.)")},
129 {
"TRUCK_BLINK_LEFT",
EV_TRUCK_BLINK_LEFT,
"Keyboard EXPL+COMMA",
_LC(
"InputEvent",
"toggle left direction indicator (blinker)")},
130 {
"TRUCK_BLINK_RIGHT",
EV_TRUCK_BLINK_RIGHT,
"Keyboard EXPL+PERIOD",
_LC(
"InputEvent",
"toggle right direction indicator (blinker)")},
131 {
"TRUCK_BLINK_WARN",
EV_TRUCK_BLINK_WARN,
"Keyboard EXPL+MINUS",
_LC(
"InputEvent",
"toggle all direction indicators")},
135 {
"TRUCK_HORN",
EV_TRUCK_HORN,
"Keyboard H",
_LC(
"InputEvent",
"truck horn")},
152 {
"TRUCK_CRUISE_CONTROL_READJUST",
EV_TRUCK_CRUISE_CONTROL_READJUST,
"Keyboard EXPL+CTRL+SPACE",
_LC(
"InputEvent",
"match target speed / rpm with current truck speed / rpm")},
155 {
"TRUCK_STARTER",
EV_TRUCK_STARTER,
"Keyboard S",
_LC(
"InputEvent",
"hold to start the engine")},
172 {
"TRUCK_AUTOSHIFT_DOWN",
EV_TRUCK_AUTOSHIFT_DOWN,
"Keyboard PGDOWN",
_LC(
"InputEvent",
"shift automatic transmission one gear down")},
173 {
"TRUCK_AUTOSHIFT_UP",
EV_TRUCK_AUTOSHIFT_UP,
"Keyboard PGUP",
_LC(
"InputEvent",
"shift automatic transmission one gear up")},
174 {
"TRUCK_MANUAL_CLUTCH",
EV_TRUCK_MANUAL_CLUTCH,
"Keyboard LSHIFT",
_LC(
"InputEvent",
"manual clutch (for manual transmission)")},
175 {
"TRUCK_SHIFT_DOWN",
EV_TRUCK_SHIFT_DOWN,
"Keyboard Z",
_LC(
"InputEvent",
"shift one gear down in manual transmission mode")},
176 {
"TRUCK_SHIFT_NEUTRAL",
EV_TRUCK_SHIFT_NEUTRAL,
"Keyboard D",
_LC(
"InputEvent",
"shift to neutral gear in manual transmission mode")},
177 {
"TRUCK_SHIFT_UP",
EV_TRUCK_SHIFT_UP,
"Keyboard A",
_LC(
"InputEvent",
"shift one gear up in manual transmission mode")},
204 {
"AIRPLANE_BRAKE",
EV_AIRPLANE_BRAKE,
"Keyboard B",
_LC(
"InputEvent",
"normal brake for an aircraft")},
217 {
"AIRPLANE_THROTTLE_AXIS",
EV_AIRPLANE_THROTTLE_AXIS,
"None",
_LC(
"InputEvent",
"throttle axis. Only use this if you have fitting hardware :) (i.e. a Slider)")},
236 {
"BOAT_THROTTLE_AXIS",
EV_BOAT_THROTTLE_AXIS,
"None",
_LC(
"InputEvent",
"throttle axis. Only use this if you have fitting hardware :) (i.e. a Slider)")},
241 {
"COMMANDS_01",
EV_COMMANDS_01,
"Keyboard EXPL+F1",
_LC(
"InputEvent",
"Command 1")},
242 {
"COMMANDS_02",
EV_COMMANDS_02,
"Keyboard EXPL+F2",
_LC(
"InputEvent",
"Command 2")},
243 {
"COMMANDS_03",
EV_COMMANDS_03,
"Keyboard EXPL+F3",
_LC(
"InputEvent",
"Command 3")},
244 {
"COMMANDS_04",
EV_COMMANDS_04,
"Keyboard EXPL+F4",
_LC(
"InputEvent",
"Command 4")},
245 {
"COMMANDS_05",
EV_COMMANDS_05,
"Keyboard EXPL+F5",
_LC(
"InputEvent",
"Command 5")},
246 {
"COMMANDS_06",
EV_COMMANDS_06,
"Keyboard EXPL+F6",
_LC(
"InputEvent",
"Command 6")},
247 {
"COMMANDS_07",
EV_COMMANDS_07,
"Keyboard EXPL+F7",
_LC(
"InputEvent",
"Command 7")},
248 {
"COMMANDS_08",
EV_COMMANDS_08,
"Keyboard EXPL+F8",
_LC(
"InputEvent",
"Command 8")},
249 {
"COMMANDS_09",
EV_COMMANDS_09,
"Keyboard EXPL+F9",
_LC(
"InputEvent",
"Command 9")},
250 {
"COMMANDS_10",
EV_COMMANDS_10,
"Keyboard EXPL+F10",
_LC(
"InputEvent",
"Command 10")},
251 {
"COMMANDS_11",
EV_COMMANDS_11,
"Keyboard EXPL+F11",
_LC(
"InputEvent",
"Command 11")},
252 {
"COMMANDS_12",
EV_COMMANDS_12,
"Keyboard EXPL+F12",
_LC(
"InputEvent",
"Command 12")},
253 {
"COMMANDS_13",
EV_COMMANDS_13,
"Keyboard EXPL+CTRL+F1",
_LC(
"InputEvent",
"Command 13")},
254 {
"COMMANDS_14",
EV_COMMANDS_14,
"Keyboard EXPL+CTRL+F2",
_LC(
"InputEvent",
"Command 14")},
255 {
"COMMANDS_15",
EV_COMMANDS_15,
"Keyboard EXPL+CTRL+F3",
_LC(
"InputEvent",
"Command 15")},
256 {
"COMMANDS_16",
EV_COMMANDS_16,
"Keyboard EXPL+CTRL+F4",
_LC(
"InputEvent",
"Command 16")},
257 {
"COMMANDS_17",
EV_COMMANDS_17,
"Keyboard EXPL+CTRL+F5",
_LC(
"InputEvent",
"Command 17")},
258 {
"COMMANDS_18",
EV_COMMANDS_18,
"Keyboard EXPL+CTRL+F6",
_LC(
"InputEvent",
"Command 18")},
259 {
"COMMANDS_19",
EV_COMMANDS_19,
"Keyboard EXPL+CTRL+F7",
_LC(
"InputEvent",
"Command 19")},
260 {
"COMMANDS_20",
EV_COMMANDS_20,
"Keyboard EXPL+CTRL+F8",
_LC(
"InputEvent",
"Command 20")},
261 {
"COMMANDS_21",
EV_COMMANDS_21,
"Keyboard EXPL+CTRL+F9",
_LC(
"InputEvent",
"Command 21")},
262 {
"COMMANDS_22",
EV_COMMANDS_22,
"Keyboard EXPL+CTRL+F10",
_LC(
"InputEvent",
"Command 22")},
263 {
"COMMANDS_23",
EV_COMMANDS_23,
"Keyboard EXPL+CTRL+F11",
_LC(
"InputEvent",
"Command 23")},
264 {
"COMMANDS_24",
EV_COMMANDS_24,
"Keyboard EXPL+CTRL+F12",
_LC(
"InputEvent",
"Command 24")},
265 {
"COMMANDS_25",
EV_COMMANDS_25,
"Keyboard EXPL+SHIFT+F1",
_LC(
"InputEvent",
"Command 25")},
266 {
"COMMANDS_26",
EV_COMMANDS_26,
"Keyboard EXPL+SHIFT+F2",
_LC(
"InputEvent",
"Command 26")},
267 {
"COMMANDS_27",
EV_COMMANDS_27,
"Keyboard EXPL+SHIFT+F3",
_LC(
"InputEvent",
"Command 27")},
268 {
"COMMANDS_28",
EV_COMMANDS_28,
"Keyboard EXPL+SHIFT+F4",
_LC(
"InputEvent",
"Command 28")},
269 {
"COMMANDS_29",
EV_COMMANDS_29,
"Keyboard EXPL+SHIFT+F5",
_LC(
"InputEvent",
"Command 29")},
270 {
"COMMANDS_30",
EV_COMMANDS_30,
"Keyboard EXPL+SHIFT+F6",
_LC(
"InputEvent",
"Command 30")},
271 {
"COMMANDS_31",
EV_COMMANDS_31,
"Keyboard EXPL+SHIFT+F7",
_LC(
"InputEvent",
"Command 31")},
272 {
"COMMANDS_32",
EV_COMMANDS_32,
"Keyboard EXPL+SHIFT+F8",
_LC(
"InputEvent",
"Command 32")},
273 {
"COMMANDS_33",
EV_COMMANDS_33,
"Keyboard EXPL+SHIFT+F9",
_LC(
"InputEvent",
"Command 33")},
274 {
"COMMANDS_34",
EV_COMMANDS_34,
"Keyboard EXPL+SHIFT+F10",
_LC(
"InputEvent",
"Command 34")},
275 {
"COMMANDS_35",
EV_COMMANDS_35,
"Keyboard EXPL+SHIFT+F11",
_LC(
"InputEvent",
"Command 35")},
276 {
"COMMANDS_36",
EV_COMMANDS_36,
"Keyboard EXPL+SHIFT+F12",
_LC(
"InputEvent",
"Command 36")},
277 {
"COMMANDS_37",
EV_COMMANDS_37,
"Keyboard EXPL+ALT+F1",
_LC(
"InputEvent",
"Command 37")},
278 {
"COMMANDS_38",
EV_COMMANDS_38,
"Keyboard EXPL+ALT+F2",
_LC(
"InputEvent",
"Command 38")},
279 {
"COMMANDS_39",
EV_COMMANDS_39,
"Keyboard EXPL+ALT+F3",
_LC(
"InputEvent",
"Command 39")},
280 {
"COMMANDS_40",
EV_COMMANDS_40,
"Keyboard EXPL+ALT+F4",
_LC(
"InputEvent",
"Command 40")},
281 {
"COMMANDS_41",
EV_COMMANDS_41,
"Keyboard EXPL+ALT+F5",
_LC(
"InputEvent",
"Command 41")},
282 {
"COMMANDS_42",
EV_COMMANDS_42,
"Keyboard EXPL+ALT+F6",
_LC(
"InputEvent",
"Command 42")},
283 {
"COMMANDS_43",
EV_COMMANDS_43,
"Keyboard EXPL+ALT+F7",
_LC(
"InputEvent",
"Command 43")},
284 {
"COMMANDS_44",
EV_COMMANDS_44,
"Keyboard EXPL+ALT+F8",
_LC(
"InputEvent",
"Command 44")},
285 {
"COMMANDS_45",
EV_COMMANDS_45,
"Keyboard EXPL+ALT+F9",
_LC(
"InputEvent",
"Command 45")},
286 {
"COMMANDS_46",
EV_COMMANDS_46,
"Keyboard EXPL+ALT+F10",
_LC(
"InputEvent",
"Command 46")},
287 {
"COMMANDS_47",
EV_COMMANDS_47,
"Keyboard EXPL+ALT+F11",
_LC(
"InputEvent",
"Command 47")},
288 {
"COMMANDS_48",
EV_COMMANDS_48,
"Keyboard EXPL+ALT+F12",
_LC(
"InputEvent",
"Command 48")},
289 {
"COMMANDS_49",
EV_COMMANDS_49,
"Keyboard EXPL+CTRL+SHIFT+F1",
_LC(
"InputEvent",
"Command 49")},
290 {
"COMMANDS_50",
EV_COMMANDS_50,
"Keyboard EXPL+CTRL+SHIFT+F2",
_LC(
"InputEvent",
"Command 50")},
291 {
"COMMANDS_51",
EV_COMMANDS_51,
"Keyboard EXPL+CTRL+SHIFT+F3",
_LC(
"InputEvent",
"Command 51")},
292 {
"COMMANDS_52",
EV_COMMANDS_52,
"Keyboard EXPL+CTRL+SHIFT+F4",
_LC(
"InputEvent",
"Command 52")},
293 {
"COMMANDS_53",
EV_COMMANDS_53,
"Keyboard EXPL+CTRL+SHIFT+F5",
_LC(
"InputEvent",
"Command 53")},
294 {
"COMMANDS_54",
EV_COMMANDS_54,
"Keyboard EXPL+CTRL+SHIFT+F6",
_LC(
"InputEvent",
"Command 54")},
295 {
"COMMANDS_55",
EV_COMMANDS_55,
"Keyboard EXPL+CTRL+SHIFT+F7",
_LC(
"InputEvent",
"Command 55")},
296 {
"COMMANDS_56",
EV_COMMANDS_56,
"Keyboard EXPL+CTRL+SHIFT+F8",
_LC(
"InputEvent",
"Command 56")},
297 {
"COMMANDS_57",
EV_COMMANDS_57,
"Keyboard EXPL+CTRL+SHIFT+F9",
_LC(
"InputEvent",
"Command 57")},
298 {
"COMMANDS_58",
EV_COMMANDS_58,
"Keyboard EXPL+CTRL+SHIFT+F10",
_LC(
"InputEvent",
"Command 58")},
299 {
"COMMANDS_59",
EV_COMMANDS_59,
"Keyboard EXPL+CTRL+SHIFT+F11",
_LC(
"InputEvent",
"Command 59")},
300 {
"COMMANDS_60",
EV_COMMANDS_60,
"Keyboard EXPL+CTRL+SHIFT+F12",
_LC(
"InputEvent",
"Command 60")},
301 {
"COMMANDS_61",
EV_COMMANDS_61,
"Keyboard EXPL+CTRL+ALT+F1",
_LC(
"InputEvent",
"Command 61")},
302 {
"COMMANDS_62",
EV_COMMANDS_62,
"Keyboard EXPL+CTRL+ALT+F2",
_LC(
"InputEvent",
"Command 62")},
303 {
"COMMANDS_63",
EV_COMMANDS_63,
"Keyboard EXPL+CTRL+ALT+F3",
_LC(
"InputEvent",
"Command 63")},
304 {
"COMMANDS_64",
EV_COMMANDS_64,
"Keyboard EXPL+CTRL+ALT+F4",
_LC(
"InputEvent",
"Command 64")},
305 {
"COMMANDS_65",
EV_COMMANDS_65,
"Keyboard EXPL+CTRL+ALT+F5",
_LC(
"InputEvent",
"Command 65")},
306 {
"COMMANDS_66",
EV_COMMANDS_66,
"Keyboard EXPL+CTRL+ALT+F6",
_LC(
"InputEvent",
"Command 66")},
307 {
"COMMANDS_67",
EV_COMMANDS_67,
"Keyboard EXPL+CTRL+ALT+F7",
_LC(
"InputEvent",
"Command 67")},
308 {
"COMMANDS_68",
EV_COMMANDS_68,
"Keyboard EXPL+CTRL+ALT+F8",
_LC(
"InputEvent",
"Command 68")},
309 {
"COMMANDS_69",
EV_COMMANDS_69,
"Keyboard EXPL+CTRL+ALT+F9",
_LC(
"InputEvent",
"Command 69")},
310 {
"COMMANDS_70",
EV_COMMANDS_70,
"Keyboard EXPL+CTRL+ALT+F10",
_LC(
"InputEvent",
"Command 70")},
311 {
"COMMANDS_71",
EV_COMMANDS_71,
"Keyboard EXPL+CTRL+ALT+F11",
_LC(
"InputEvent",
"Command 71")},
312 {
"COMMANDS_72",
EV_COMMANDS_72,
"Keyboard EXPL+CTRL+ALT+F12",
_LC(
"InputEvent",
"Command 72")},
313 {
"COMMANDS_73",
EV_COMMANDS_73,
"Keyboard EXPL+CTRL+SHIFT+ALT+F1",
_LC(
"InputEvent",
"Command 73")},
314 {
"COMMANDS_74",
EV_COMMANDS_74,
"Keyboard EXPL+CTRL+SHIFT+ALT+F2",
_LC(
"InputEvent",
"Command 74")},
315 {
"COMMANDS_75",
EV_COMMANDS_75,
"Keyboard EXPL+CTRL+SHIFT+ALT+F3",
_LC(
"InputEvent",
"Command 75")},
316 {
"COMMANDS_76",
EV_COMMANDS_76,
"Keyboard EXPL+CTRL+SHIFT+ALT+F4",
_LC(
"InputEvent",
"Command 76")},
317 {
"COMMANDS_77",
EV_COMMANDS_77,
"Keyboard EXPL+CTRL+SHIFT+ALT+F5",
_LC(
"InputEvent",
"Command 77")},
318 {
"COMMANDS_78",
EV_COMMANDS_78,
"Keyboard EXPL+CTRL+SHIFT+ALT+F6",
_LC(
"InputEvent",
"Command 78")},
319 {
"COMMANDS_79",
EV_COMMANDS_79,
"Keyboard EXPL+CTRL+SHIFT+ALT+F7",
_LC(
"InputEvent",
"Command 79")},
320 {
"COMMANDS_80",
EV_COMMANDS_80,
"Keyboard EXPL+CTRL+SHIFT+ALT+F8",
_LC(
"InputEvent",
"Command 80")},
321 {
"COMMANDS_81",
EV_COMMANDS_81,
"Keyboard EXPL+CTRL+SHIFT+ALT+F9",
_LC(
"InputEvent",
"Command 81")},
322 {
"COMMANDS_82",
EV_COMMANDS_82,
"Keyboard EXPL+CTRL+SHIFT+ALT+F10",
_LC(
"InputEvent",
"Command 82")},
323 {
"COMMANDS_83",
EV_COMMANDS_83,
"Keyboard EXPL+CTRL+SHIFT+ALT+F11",
_LC(
"InputEvent",
"Command 83")},
324 {
"COMMANDS_84",
EV_COMMANDS_84,
"Keyboard EXPL+CTRL+SHIFT+ALT+F12",
_LC(
"InputEvent",
"Command 84")},
328 {
"CHARACTER_FORWARD",
EV_CHARACTER_FORWARD,
"Keyboard W",
_LC(
"InputEvent",
"step forward with the character")},
329 {
"CHARACTER_JUMP",
EV_CHARACTER_JUMP,
"Keyboard SPACE",
_LC(
"InputEvent",
"let the character jump")},
330 {
"CHARACTER_LEFT",
EV_CHARACTER_LEFT,
"Keyboard LEFT",
_LC(
"InputEvent",
"rotate character left")},
331 {
"CHARACTER_RIGHT",
EV_CHARACTER_RIGHT,
"Keyboard RIGHT",
_LC(
"InputEvent",
"rotate character right")},
332 {
"CHARACTER_RUN",
EV_CHARACTER_RUN,
"Keyboard SHIFT+W",
_LC(
"InputEvent",
"let the character run")},
339 {
"CAMERA_CHANGE",
EV_CAMERA_CHANGE,
"Keyboard EXPL+C",
_LC(
"InputEvent",
"change camera mode")},
340 {
"CAMERA_LOOKBACK",
EV_CAMERA_LOOKBACK,
"Keyboard NUMPAD1",
_LC(
"InputEvent",
"look back (toggles between normal and lookback)")},
341 {
"CAMERA_RESET",
EV_CAMERA_RESET,
"Keyboard NUMPAD5",
_LC(
"InputEvent",
"reset the camera position")},
346 {
"CAMERA_ZOOM_IN",
EV_CAMERA_ZOOM_IN,
"Keyboard EXPL+NUMPAD9",
_LC(
"InputEvent",
"zoom camera in")},
348 {
"CAMERA_ZOOM_OUT",
EV_CAMERA_ZOOM_OUT,
"Keyboard EXPL+NUMPAD3",
_LC(
"InputEvent",
"zoom camera out")},
351 {
"CAMERA_FREE_MODE",
EV_CAMERA_FREE_MODE,
"Keyboard EXPL+SHIFT+C",
_LC(
"InputEvent",
"enable / disable free camera mode")},
352 {
"CAMERA_UP",
EV_CAMERA_UP,
"Keyboard Q",
_LC(
"InputEvent",
"move camera up")},
353 {
"CAMERA_DOWN",
EV_CAMERA_DOWN,
"Keyboard Z",
_LC(
"InputEvent",
"move camera down")},
362 {
"GRASS_LESS",
EV_GRASS_LESS,
"",
_LC(
"InputEvent",
"EXPERIMENTAL: remove some grass")},
363 {
"GRASS_MORE",
EV_GRASS_MORE,
"",
_LC(
"InputEvent",
"EXPERIMENTAL: add some grass")},
364 {
"GRASS_MOST",
EV_GRASS_MOST,
"",
_LC(
"InputEvent",
"EXPERIMENTAL: set maximum amount of grass")},
365 {
"GRASS_NONE",
EV_GRASS_NONE,
"",
_LC(
"InputEvent",
"EXPERIMENTAL: remove grass completely")},
366 {
"GRASS_SAVE",
EV_GRASS_SAVE,
"",
_LC(
"InputEvent",
"EXPERIMENTAL: save changes to the grass density image")},
376 {
"MENU_DOWN",
EV_MENU_DOWN,
"Keyboard DOWN",
_LC(
"InputEvent",
"select next element in current category")},
377 {
"MENU_LEFT",
EV_MENU_LEFT,
"Keyboard LEFT",
_LC(
"InputEvent",
"select previous category")},
378 {
"MENU_RIGHT",
EV_MENU_RIGHT,
"Keyboard RIGHT",
_LC(
"InputEvent",
"select next category")},
379 {
"MENU_SELECT",
EV_MENU_SELECT,
"Keyboard EXPL+RETURN",
_LC(
"InputEvent",
"select focussed item and close menu")},
380 {
"MENU_UP",
EV_MENU_UP,
"Keyboard UP",
_LC(
"InputEvent",
"select previous element in current category")},
383 {
"TRUCKEDIT_RELOAD",
EV_TRUCKEDIT_RELOAD,
"Keyboard EXPL+SHIFT+CTRL+R",
_LC(
"InputEvent",
"reload truck")},
396 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
397 #define strnlen(str,len) strlen(str)
402 #define OIS_DYNAMIC_LIB
405 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
406 #include <X11/Xlib.h>
411 using namespace Ogre;
427 LOG(
"*** Loading OIS ***");
443 LOG(
"*** Terminating OIS ***");
475 LOG(
"*** Initializing OIS ***");
481 pl.insert(OIS::ParamList::value_type(
"WINDOW",
TOSTRING(hWnd)));
484 #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
485 pl.insert(OIS::ParamList::value_type(
"x11_mouse_hide",
"true"));
486 pl.insert(OIS::ParamList::value_type(
"XAutoRepeatOn",
"false"));
487 pl.insert(OIS::ParamList::value_type(
"x11_mouse_grab",
"false"));
488 pl.insert(OIS::ParamList::value_type(
"x11_keyboard_grab",
"false"));
490 pl.insert(OIS::ParamList::value_type(
"w32_mouse",
"DISCL_FOREGROUND"));
491 pl.insert(OIS::ParamList::value_type(
"w32_mouse",
"DISCL_NONEXCLUSIVE"));
492 pl.insert(OIS::ParamList::value_type(
"w32_keyboard",
"DISCL_FOREGROUND"));
493 pl.insert(OIS::ParamList::value_type(
"w32_keyboard",
"DISCL_NONEXCLUSIVE"));
497 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
512 LOG(
"OIS Version: " +
TOSTRING(v>>16) + String(
".") +
TOSTRING((v>>8) & 0x000000FF) + String(
".") +
TOSTRING(v & 0x000000FF));
520 OIS::DeviceList deviceList =
mInputManager->listFreeDevices();
521 for (OIS::DeviceList::iterator i = deviceList.begin(); i != deviceList.end(); ++i)
522 LOG(
"* Device: " + String(
mOISDeviceType[i->first]) + String(
" Vendor: ") + i->second);
530 mKeyboard->setTextTranslation(OIS::Keyboard::Unicode);
532 catch (OIS::Exception& ex)
534 LOG(String(
"Exception raised on keyboard creation: ") + String(ex.eText));
541 int numSticks = std::min(
mInputManager->getNumberOfDevices(OISJoyStick), 10);
543 for (
int i = 0; i < numSticks; ++i)
550 mForceFeedback = (OIS::ForceFeedback*)
mJoy[i]->queryInterface(OIS::Interface::ForceFeedback);
552 LOG(
"Creating Joystick " +
TOSTRING(i + 1) +
" (" +
mJoy[i]->vendor() +
")");
553 LOG(
"* Axes: " +
TOSTRING(
mJoy[i]->getNumberOfComponents(OIS_Axis)));
554 LOG(
"* Sliders: " +
TOSTRING(
mJoy[i]->getNumberOfComponents(OIS_Slider)));
555 LOG(
"* POV/HATs: " +
TOSTRING(
mJoy[i]->getNumberOfComponents(OIS_POV)));
556 LOG(
"* Buttons: " +
TOSTRING(
mJoy[i]->getNumberOfComponents(OIS_Button)));
557 LOG(
"* Vector3: " +
TOSTRING(
mJoy[i]->getNumberOfComponents(OIS_Vector3)));
560 catch (OIS::Exception& ex)
562 LOG(String(
"Exception raised on joystick creation: ") + String(ex.eText));
569 catch (OIS::Exception& ex)
571 LOG(String(
"Exception raised on mouse creation: ") + String(ex.eText));
586 OIS::MouseState& mutableMouseState =
const_cast<OIS::MouseState &
>(
mMouse->getMouseState());
605 return mMouse->getMouseState();
612 if (keycode == KC_LCONTROL || keycode == KC_RCONTROL)
614 if (keycode == KC_LMENU || keycode == KC_RMENU)
618 if (
allit->second == keycode)
641 unsigned int width, height, depth;
643 rw->getMetrics(width, height, depth, left, top);
644 const OIS::MouseState& ms =
mMouse->getMouseState();
652 mKeyboard->setEventCallback(keyboard_listener);
658 mMouse->setEventCallback(mouse_listener);
665 mJoy[i]->setEventCallback(obj);
672 int i = arg.device->getID();
698 for (std::map<int, bool>::iterator iter =
keyState.begin(); iter !=
keyState.end(); ++iter)
700 iter->second =
false;
755 if (fabs(axisValue) < dz)
760 return (axisValue - dz) * (1.0f / (1.0f - dz));
765 return (axisValue * linearity);
771 return log10(1.0 / (1.1 - val)) / 1.0;
774 return -log10(1.0 / (1.1 + val)) / 1.0;
779 std::vector<event_trigger_t>& t_vec =
events[eventID];
780 if (t_vec.size() > 0)
801 std::vector<event_trigger_t>& t_vec =
events[eventID];
802 if (t_vec.size() > 0)
867 std::vector<event_trigger_t> t_vec =
events[eventID];
868 if (t_vec.size() > 0)
870 if (t_vec[0].eventtype !=
ET_NONE)
878 std::vector<event_trigger_t> t_vec =
events[eventID];
879 for (std::vector<event_trigger_t>::iterator i = t_vec.begin(); i != t_vec.end(); i++)
890 std::vector<event_trigger_t> t_vec =
events[eventID];
891 if (t_vec.size() > 0)
895 for (
unsigned int i = 0; i < t_vec.size(); i++)
918 if (simulatedValue != 0.f)
919 return simulatedValue;
924 float returnValue = 0;
925 std::vector<event_trigger_t> t_vec =
events[eventID];
927 for (std::vector<event_trigger_t>::iterator i = t_vec.begin(); i != t_vec.end(); i++)
1052 value = (value + 1) / 2;
1075 value = (1.0 + value) / 2.0;
1077 value = 1.0 - value;
1113 value = (value + 1) / 2;
1115 value = 1.0 - value;
1121 if (value > returnValue)
1122 returnValue = value;
1193 default:
return "unknown";
1200 events[eventID].push_back(t);
1212 events[eventID] = std::vector<event_trigger_t>();
1235 events[eventID] = std::vector<event_trigger_t>();
1238 events[eventID].push_back(t);
1246 for (
size_t i = 0; i < triggers.size(); i++)
1248 if (t == &triggers[i])
1250 triggers.erase(triggers.begin() + i);
1267 for (
auto& ev_pair:
events)
1269 if (ev_pair.second.size() > 0)
1271 auto itor = ev_pair.second.begin();
1272 while (itor != ev_pair.second.end())
1274 if (itor->configDeviceID == deviceID)
1275 itor = ev_pair.second.erase(itor);
1291 static String cur_comment =
"";
1293 char eventName[256] =
"", evtype[256] =
"";
1294 const char delimiters[] =
"+";
1295 size_t linelen =
strnlen(line, 1024);
1299 float defaultDeadzone = 0.1f;
1300 float defaultLinearity = 1.0f;
1301 if (line[0] ==
';' || linelen < 5)
1303 cur_comment += line;;
1306 sscanf(line,
"%s %s", eventName, evtype);
1310 if (!strncmp(evtype,
"Keyboard", 8))
1312 else if (!strncmp(evtype,
"MouseButton", 10))
1314 else if (!strncmp(evtype,
"MouseAxisX", 9))
1316 else if (!strncmp(evtype,
"MouseAxisY", 9))
1318 else if (!strncmp(evtype,
"MouseAxisZ", 9))
1320 else if (!strncmp(evtype,
"JoystickButton", 14))
1322 else if (!strncmp(evtype,
"JoystickAxis", 12))
1325 else if (!strncmp(evtype,
"JoystickPov", 11))
1327 else if (!strncmp(evtype,
"JoystickSlider", 14))
1329 else if (!strncmp(evtype,
"JoystickSliderX", 15))
1331 else if (!strncmp(evtype,
"JoystickSliderY", 15))
1333 else if (!strncmp(evtype,
"None", 4))
1346 char keycodes[256] = {};
1347 char keycodes_work[256] = {};
1349 OIS::KeyCode key = KC_UNASSIGNED;
1351 sscanf(line,
"%s %s %s", eventName, evtype, keycodes);
1354 strncpy(keycodes_work, keycodes, 255);
1355 keycodes_work[255] =
'\0';
1356 char* token = strtok(keycodes_work, delimiters);
1358 while (token != NULL)
1360 if (strncmp(token,
"SHIFT", 5) == 0)
1362 else if (strncmp(token,
"CTRL", 4) == 0)
1364 else if (strncmp(token,
"ALT", 3) == 0)
1366 else if (strncmp(token,
"EXPL", 4) == 0)
1369 token = strtok(NULL, delimiters);
1376 LOG(
"unknown key: " +
string(keycodes));
1378 key = KC_UNASSIGNED;
1383 key =
allit->second;
1388 LOG(
"Error while processing input config: Unknown Event: "+String(eventName));
1394 t_key.
shift = shift;
1404 strncpy(t_key.
comments, cur_comment.c_str(), 1024);
1412 char tmp2[256] = {};
1413 sscanf(line,
"%s %s %d %d %s", eventName, evtype, &joyNo, &buttonNo, tmp2);
1422 if (!strcmp(tmp2,
"!NEW!"))
1429 sprintf(tmp,
"%d", buttonNo);
1434 strncpy(t_joy.
comments, cur_comment.c_str(), 1024);
1443 char options[256] = {};
1444 sscanf(line,
"%s %s %d %d %s", eventName, evtype, &joyNo, &axisNo, options);
1450 bool reverse =
false;
1451 bool linear =
false;
1452 bool relative =
false;
1453 bool usedigital =
false;
1454 float deadzone = defaultDeadzone;
1455 float linearity = defaultLinearity;
1456 int jAxisRegion = 0;
1461 strcpy(tmp, options);
1463 char* token = strtok(tmp, delimiters);
1464 while (token != NULL)
1466 if (strncmp(token,
"HALF", 4) == 0)
1468 else if (strncmp(token,
"REVERSE", 7) == 0)
1470 else if (strncmp(token,
"LINEAR", 6) == 0)
1472 else if (strncmp(token,
"UPPER", 5) == 0)
1474 else if (strncmp(token,
"LOWER", 5) == 0)
1476 else if (strncmp(token,
"RELATIVE", 8) == 0)
1478 else if (strncmp(token,
"DIGITAL", 7) == 0)
1480 else if (strncmp(token,
"DEADZONE", 8) == 0 &&
strnlen(token, 250) > 9)
1482 char tmp2[256] = {};
1483 strcpy(tmp2, token + 9);
1484 deadzone = atof(tmp2);
1487 else if (strncmp(token,
"LINEARITY", 9) == 0 &&
strnlen(token, 250) > 10)
1489 char tmp2[256] = {};
1490 strcpy(tmp2, token + 10);
1491 linearity = atof(tmp2);
1493 token = strtok(NULL, delimiters);
1513 strncpy(t_joy.
comments, cur_comment.c_str(), 1024);
1538 sscanf(line,
"%s %s %d %d %s", eventName, evtype, &joyNo, &povNumber, dir);
1543 int direction = OIS::Pov::Centered;
1544 if (!strcmp(dir,
"North"))
1545 direction = OIS::Pov::North;
1546 if (!strcmp(dir,
"South"))
1547 direction = OIS::Pov::South;
1548 if (!strcmp(dir,
"East"))
1549 direction = OIS::Pov::East;
1550 if (!strcmp(dir,
"West"))
1551 direction = OIS::Pov::West;
1552 if (!strcmp(dir,
"NorthEast"))
1553 direction = OIS::Pov::NorthEast;
1554 if (!strcmp(dir,
"SouthEast"))
1555 direction = OIS::Pov::SouthEast;
1556 if (!strcmp(dir,
"NorthWest"))
1557 direction = OIS::Pov::NorthWest;
1558 if (!strcmp(dir,
"SouthWest"))
1559 direction = OIS::Pov::SouthWest;
1570 strncpy(t_pov.
comments, cur_comment.c_str(), 1024);
1580 int sliderNumber = 0;
1581 char options[256] = {};
1583 sscanf(line,
"%s %s %d %c %d %s", eventName, evtype, &joyNo, &type, &sliderNumber, options);
1588 bool reverse =
false;
1590 strncpy(tmp, options, 255);
1592 char* token = strtok(tmp, delimiters);
1593 while (token != NULL)
1595 if (strncmp(token,
"REVERSE", 7) == 0)
1598 token = strtok(NULL, delimiters);
1604 if (type ==
'Y' || type ==
'y')
1606 else if (type ==
'X' || type ==
'x')
1618 strncpy(t_slider.
comments, cur_comment.c_str(), 1024);
1633 for (
int i = 0; i < (int)
joyState[j].mButtons.size(); i++)
1652 if (
joyState[j].mPOV[i].direction != Pov::Centered)
1656 povdir =
joyState[j].mPOV[i].direction;
1666 OIS::MouseState
const& mstate =
mMouse->getMouseState();
1668 res.x =
static_cast<float>(mstate.X.abs) /
static_cast<float>(mstate.width);
1669 res.y =
static_cast<float>(mstate.Y.abs) /
static_cast<float>(mstate.height);
1684 return mJoy[joystickNumber]->getNumberOfComponents(type);
1691 return mJoy[joystickNumber]->vendor();
1703 std::map<int, bool>::iterator i;
1712 if (i->first !=
KC_LSHIFT && i->first !=
KC_RSHIFT && i->first != KC_LCONTROL && i->first != KC_RCONTROL && i->first != KC_LMENU && i->first != KC_RMENU)
1719 *combo = *combo +
"+" + keyName;
1728 if (i->first ==
KC_LSHIFT || i->first ==
KC_RSHIFT || i->first == KC_LCONTROL || i->first == KC_RCONTROL || i->first == KC_LMENU || i->first == KC_RMENU)
1734 *combo = *combo +
"+" + keyName;
1740 if (modCounter > 0 && keyCounter == 0)
1744 else if (keyCounter == 0 && modCounter == 0)
1746 *combo =
_L(
"(Please press a key)");
1754 const char delimiters[] =
"_";
1756 strncpy(tmp, eventName.c_str(), 255);
1758 char* token = strtok(tmp, delimiters);
1759 while (token != NULL)
1761 return String(token);
1862 String deviceStr =
mJoy[deviceID]->vendor();
1865 String repl =
"\\/ #@?!$%^&*()+=-><.:'|\";";
1866 for (
unsigned int c = 0; c < repl.size(); c++)
1868 deviceStr = StringUtil::replaceAll(deviceStr, repl.substr(c, 1),
"_");
1872 String osSpecificMapFile;
1873 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
1874 osSpecificMapFile = deviceStr +
".windows.map";
1875 #elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX
1876 osSpecificMapFile = deviceStr +
".linux.map";
1878 if (osSpecificMapFile !=
"" &&
1879 ResourceGroupManager::getSingleton().resourceExists(
RGN_CONFIG, osSpecificMapFile))
1881 fileName = osSpecificMapFile;
1886 fileName = deviceStr +
".map";
1916 char line[1025] =
"";
1919 LOG(
" * Loading input mapping " + fileName);
1924 ds = ResourceGroupManager::getSingleton().openResource(fileName,
RGN_CONFIG);
1933 if (ds->tell() + size >= ds->size())
1934 size = ds->size() - ds->tell();
1935 if (ds->tell() >= ds->size())
1937 size_t readnum = ds->readLine(line, size);
1944 LOG(
" * Input map successfully loaded: " +
TOSTRING(newEvents) +
" entries");
1950 const int COL1_WIDTH = 34;
1951 const int COL2_WIDTH = 19;
1956 Ogre::DataStreamPtr ds = Ogre::ResourceGroupManager::getSingleton().createResource(
1960 for (
auto& ev_pair:
events)
1982 std::string line =
fmt::format(
"{:<{}} {:<{}} {}\n",
1984 this->getEventTypeName(ev.
eventtype), COL2_WIDTH,
1986 ds->write(line.c_str(), line.size());
1992 catch (Ogre::Exception& e)
1995 fmt::format(
"Failed to write '{}', {}", fileName, e.getDescription()));
2009 LOG(
"unknown event (ignored): " + eventName);
2050 allkeys[
"ABNT_C1"] = KC_ABNT_C1;
2051 allkeys[
"ABNT_C2"] = KC_ABNT_C2;
2061 allkeys[
"CALCULATOR"] = KC_CALCULATOR;
2062 allkeys[
"CAPITAL"] = KC_CAPITAL;
2065 allkeys[
"CONVERT"] = KC_CONVERT;
2067 allkeys[
"DECIMAL"] = KC_DECIMAL;
2069 allkeys[
"DIVIDE"] = KC_DIVIDE;
2103 allkeys[
"LCONTROL"] = KC_LCONTROL;
2110 allkeys[
"MEDIASELECT"] = KC_MEDIASELECT;
2111 allkeys[
"MEDIASTOP"] = KC_MEDIASTOP;
2115 allkeys[
"MYCOMPUTER"] = KC_MYCOMPUTER;
2117 allkeys[
"NEXTTRACK"] = KC_NEXTTRACK;
2118 allkeys[
"NOCONVERT"] = KC_NOCONVERT;
2130 allkeys[
"NUMPADCOMMA"] = KC_NUMPADCOMMA;
2131 allkeys[
"NUMPADENTER"] = KC_NUMPADENTER;
2132 allkeys[
"NUMPADEQUALS"] = KC_NUMPADEQUALS;
2134 allkeys[
"OEM_102"] = KC_OEM_102;
2140 allkeys[
"PLAYPAUSE"] = KC_PLAYPAUSE;
2142 allkeys[
"PREVTRACK"] = KC_PREVTRACK;
2146 allkeys[
"RCONTROL"] = KC_RCONTROL;
2153 allkeys[
"SCROLL"] = KC_SCROLL;
2164 allkeys[
"UNDERLINE"] = KC_UNDERLINE;
2165 allkeys[
"UNLABELED"] = KC_UNLABELED;
2168 allkeys[
"VOLUMEDOWN"] = KC_VOLUMEDOWN;
2169 allkeys[
"VOLUMEUP"] = KC_VOLUMEUP;
2172 allkeys[
"WEBBACK"] = KC_WEBBACK;
2173 allkeys[
"WEBFAVORITES"] = KC_WEBFAVORITES;
2174 allkeys[
"WEBFORWARD"] = KC_WEBFORWARD;
2175 allkeys[
"WEBHOME"] = KC_WEBHOME;
2176 allkeys[
"WEBREFRESH"] = KC_WEBREFRESH;
2177 allkeys[
"WEBSEARCH"] = KC_WEBSEARCH;
2178 allkeys[
"WEBSTOP"] = KC_WEBSTOP;
2187 std::map<int, std::vector<event_trigger_t>>::iterator it =
events.find(eventID);
2191 if (it->second.empty())
2194 std::vector<event_trigger_t>::iterator it2 = it->second.begin();
2202 case OIS::KC_LMENU:
return _LC(
"ModifierKey",
"Left Alt");
2204 case OIS::KC_LCONTROL:
return _LC(
"ModifierKey",
"Left Ctrl");
2206 case OIS::KC_RMENU:
return _LC(
"ModifierKey",
"Right Alt");
2208 case OIS::KC_RCONTROL:
return _LC(
"ModifierKey",
"Right Ctrl");
enum Script2Game::inputEvents KC_SUBTRACT
#define ROR_ASSERT(_EXPR)
enum Script2Game::inputEvents KC_4
enum Script2Game::inputEvents KC_NUMPAD1
enum Script2Game::inputEvents KC_INSERT
enum Script2Game::inputEvents KC_1
enum Script2Game::inputEvents KC_HOME
enum Script2Game::inputEvents KC_LBRACKET
enum Script2Game::inputEvents KC_PAUSE
enum Script2Game::inputEvents KC_NUMPAD7
enum Script2Game::inputEvents KC_NUMPAD4
enum Script2Game::inputEvents KC_PGDOWN
enum Script2Game::inputEvents KC_MINUS
enum Script2Game::inputEvents KC_DELETE
enum Script2Game::inputEvents KC_NUMPAD9
enum Script2Game::inputEvents KC_6
enum Script2Game::inputEvents KC_PGUP
Ogre::RenderWindow * GetRenderWindow()
enum Script2Game::inputEvents KC_GRAVE
AppContext * GetAppContext()
enum Script2Game::inputEvents KC_F10
Truck file format(technical spec)
enum eventtypes eventtype
enum Script2Game::inputEvents KC_F8
enum Script2Game::inputEvents KC_RETURN
enum Script2Game::inputEvents KC_EQUALS
float joystickAxisLinearity
enum Script2Game::inputEvents KC_RIGHT
System integration layer; inspired by OgreBites::ApplicationContext.
void putMessage(MessageArea area, MessageType type, std::string const &msg, std::string icon="")
enum Script2Game::inputEvents KC_ESCAPE
enum Script2Game::inputEvents KC_SLASH
enum Script2Game::inputEvents KC_LSHIFT
enum Script2Game::inputEvents KC_F4
enum Script2Game::inputEvents KC_NUMPAD0
enum Script2Game::inputEvents KC_9
enum Script2Game::inputEvents KC_F11
enum Script2Game::inputEvents KC_F7
int configDeviceID
For which device (which config file) was this binding defined?
enum Script2Game::inputEvents KC_SEMICOLON
enum Script2Game::inputEvents KC_NUMPAD6
enum Script2Game::inputEvents KC_NUMPAD5
enum Script2Game::inputEvents KC_TAB
enum Script2Game::inputEvents KC_PERIOD
enum Script2Game::inputEvents KC_F6
enum Script2Game::inputEvents KC_END
int joystickSliderReverse
enum Script2Game::inputEvents KC_F1
float joystickAxisDeadzone
enum Script2Game::inputEvents KC_SPACE
enum Script2Game::inputEvents KC_DOWN
enum Script2Game::inputEvents KC_8
enum Script2Game::inputEvents KC_ADD
enum Script2Game::inputEvents KC_F12
enum Script2Game::inputEvents KC_F2
enum Script2Game::inputEvents KC_RBRACKET
enum Script2Game::inputEvents KC_5
enum Script2Game::inputEvents KC_3
enum Script2Game::inputEvents KC_F9
enum Script2Game::inputEvents KC_NUMLOCK
enum Script2Game::inputEvents KC_APOSTROPHE
enum Script2Game::inputEvents KC_BACKSLASH
enum Script2Game::inputEvents KC_LWIN
char configline[256]
Mixed use: keyboard=key, joyButton=buttonNum, POV=direction, joyAxes=options.
enum Script2Game::inputEvents KC_NUMPAD8
CVar * io_input_grab_mode
enum Script2Game::inputEvents KC_RWIN
enum Script2Game::inputEvents KC_RSHIFT
enum Script2Game::inputEvents KC_F5
enum Script2Game::inputEvents KC_7
bool joystickAxisUseDigital
enum Script2Game::inputEvents KC_UP
InputEngine * GetInputEngine()
enum Script2Game::inputEvents KC_MULTIPLY
enum Script2Game::inputEvents KC_F3
@ CONSOLE_MSGTYPE_INFO
Generic message.
enum Script2Game::inputEvents KC_LEFT
enum Script2Game::inputEvents KC_NUMPAD3
enum Script2Game::inputEvents KC_2
enum Script2Game::inputEvents KC_NUMPAD2
enum Script2Game::inputEvents KC_0
enum Script2Game::inputEvents KC_COMMA