defaultKeybinds.tscript 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. if(!isObject( ExampleMoveMap ) )
  2. {
  3. new ActionMap(ExampleMoveMap)
  4. {
  5. humanReadableName = "Example Movement";
  6. };
  7. }
  8. //------------------------------------------------------------------------------
  9. // Set up remappable entries
  10. //------------------------------------------------------------------------------
  11. addKeyRemap("Forward", "ExampleMoveMap", "keyboard", "moveForward", "Forward Movement");
  12. addKeyRemap("Backward", "ExampleMoveMap", "keyboard", "movebackward", "Backward Movement");
  13. addKeyRemap("Strafe Left", "ExampleMoveMap", "keyboard", "moveleft", "Left Strafing Movement");
  14. addKeyRemap("Strafe Right", "ExampleMoveMap", "keyboard", "moveright", "Right Strafing Movement");
  15. addKeyRemap("Ascend", "ExampleMoveMap", "keyboard", "moveup", "Makes the camera ascend");
  16. addKeyRemap("Descend", "ExampleMoveMap", "keyboard", "movedown", "Makes the camera descend");
  17. addKeyRemap("Jump", "ExampleMoveMap", "keyboard", "jump", "Jump");
  18. //------------------------------------------------------------------------------
  19. // Non-remapable binds
  20. //------------------------------------------------------------------------------
  21. ExampleMoveMap.bind( keyboard, F2, showPlayerList );
  22. ExampleMoveMap.bind(keyboard, "ctrl h", hideHUDs);
  23. ExampleMoveMap.bind(keyboard, "alt p", doScreenShotHudless);
  24. ExampleMoveMap.bindCmd(keyboard, "escape", "", "Canvas.pushDialog(PauseMenu);");
  25. //------------------------------------------------------------------------------
  26. // Movement Keys
  27. //------------------------------------------------------------------------------
  28. ExampleMoveMap.bind( keyboard, a, moveleft );
  29. ExampleMoveMap.bind( keyboard, d, moveright );
  30. ExampleMoveMap.bind( keyboard, left, moveleft );
  31. ExampleMoveMap.bind( keyboard, right, moveright );
  32. ExampleMoveMap.bind( keyboard, w, moveforward );
  33. ExampleMoveMap.bind( keyboard, s, movebackward );
  34. ExampleMoveMap.bind( keyboard, up, moveforward );
  35. ExampleMoveMap.bind( keyboard, down, movebackward );
  36. ExampleMoveMap.bind( keyboard, e, moveup );
  37. ExampleMoveMap.bind( keyboard, c, movedown );
  38. ExampleMoveMap.bind( keyboard, space, jump );
  39. ExampleMoveMap.bind( mouse, xaxis, yaw );
  40. ExampleMoveMap.bind( mouse, yaxis, pitch );
  41. ExampleMoveMap.bind( gamepad, thumbrx, "D", "-0.23 0.23", gamepadYaw );
  42. ExampleMoveMap.bind( gamepad, thumbry, "D", "-0.23 0.23", gamepadPitch );
  43. ExampleMoveMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamePadMoveX );
  44. ExampleMoveMap.bind( gamepad, thumbly, "D", "-0.23 0.23", gamePadMoveY );
  45. ExampleMoveMap.bind( gamepad, btn_a, jump );
  46. ExampleMoveMap.bindCmd( gamepad, btn_back, "disconnect();", "" );
  47. //------------------------------------------------------------------------------
  48. // Demo recording functions
  49. //------------------------------------------------------------------------------
  50. ExampleMoveMap.bind( keyboard, F3, startRecordingDemo );
  51. ExampleMoveMap.bind( keyboard, F4, stopRecordingDemo );
  52. //------------------------------------------------------------------------------
  53. // Helper Functions
  54. //------------------------------------------------------------------------------
  55. GlobalActionMap.bind(keyboard, "ctrl F3", doProfile);
  56. //------------------------------------------------------------------------------
  57. // Misc.
  58. //------------------------------------------------------------------------------
  59. GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
  60. ExampleMoveMap.bindCmd(keyboard, "n", "toggleNetGraph();", "");