default.keybinds.cs 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. if ( isObject( ExampleMoveMap ) )
  23. ExampleMoveMap.delete();
  24. new ActionMap(ExampleMoveMap);
  25. //------------------------------------------------------------------------------
  26. // Non-remapable binds
  27. //------------------------------------------------------------------------------
  28. ExampleMoveMap.bind( keyboard, F2, showPlayerList );
  29. ExampleMoveMap.bind(keyboard, "ctrl h", hideHUDs);
  30. ExampleMoveMap.bind(keyboard, "alt p", doScreenShotHudless);
  31. ExampleMoveMap.bindCmd(keyboard, "escape", "", "disconnect();");
  32. //------------------------------------------------------------------------------
  33. // Movement Keys
  34. //------------------------------------------------------------------------------
  35. ExampleMoveMap.bind( keyboard, a, moveleft );
  36. ExampleMoveMap.bind( keyboard, d, moveright );
  37. ExampleMoveMap.bind( keyboard, left, moveleft );
  38. ExampleMoveMap.bind( keyboard, right, moveright );
  39. ExampleMoveMap.bind( keyboard, w, moveforward );
  40. ExampleMoveMap.bind( keyboard, s, movebackward );
  41. ExampleMoveMap.bind( keyboard, up, moveforward );
  42. ExampleMoveMap.bind( keyboard, down, movebackward );
  43. ExampleMoveMap.bind( keyboard, e, moveup );
  44. ExampleMoveMap.bind( keyboard, c, movedown );
  45. ExampleMoveMap.bind( keyboard, space, jump );
  46. ExampleMoveMap.bind( mouse, xaxis, yaw );
  47. ExampleMoveMap.bind( mouse, yaxis, pitch );
  48. ExampleMoveMap.bind( gamepad, thumbrx, "D", "-0.23 0.23", gamepadYaw );
  49. ExampleMoveMap.bind( gamepad, thumbry, "D", "-0.23 0.23", gamepadPitch );
  50. ExampleMoveMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamePadMoveX );
  51. ExampleMoveMap.bind( gamepad, thumbly, "D", "-0.23 0.23", gamePadMoveY );
  52. ExampleMoveMap.bind( gamepad, btn_a, jump );
  53. ExampleMoveMap.bindCmd( gamepad, btn_back, "disconnect();", "" );
  54. //------------------------------------------------------------------------------
  55. // Misc.
  56. //------------------------------------------------------------------------------
  57. GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
  58. GlobalActionMap.bindCmd(keyboard, "alt k", "cls();","");
  59. GlobalActionMap.bindCmd(keyboard, "alt enter", "", "Canvas.attemptFullscreenToggle();");
  60. GlobalActionMap.bindCmd(keyboard, "F1", "", "contextHelp();");
  61. ExampleMoveMap.bindCmd(keyboard, "n", "toggleNetGraph();", "");