summaryrefslogtreecommitdiff
path: root/src/client/keycodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/keycodes.h')
-rw-r--r--src/client/keycodes.h42
1 files changed, 38 insertions, 4 deletions
diff --git a/src/client/keycodes.h b/src/client/keycodes.h
index ae6f189..3b2958d 100644
--- a/src/client/keycodes.h
+++ b/src/client/keycodes.h
@@ -1,13 +1,14 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
-Copyright (C) 2000-2006 Tim Angus
+Copyright (C) 2000-2013 Darklegion Development
+Copyright (C) 2015-2019 GrangerHub
This file is part of Tremulous.
Tremulous is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2 of the License,
+published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
Tremulous is distributed in the hope that it will be
@@ -16,8 +17,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with Tremulous; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+along with Tremulous; if not, see <https://www.gnu.org/licenses/>
+
===========================================================================
*/
//
@@ -262,6 +263,39 @@ typedef enum {
K_EURO,
K_UNDO,
+ // Gamepad controls
+ // Ordered to match SDL2 game controller buttons and axes
+ // Do not change this order without also changing IN_GamepadMove() in SDL_input.c
+ K_PAD0_A,
+ K_PAD0_B,
+ K_PAD0_X,
+ K_PAD0_Y,
+ K_PAD0_BACK,
+ K_PAD0_GUIDE,
+ K_PAD0_START,
+ K_PAD0_LEFTSTICK_CLICK,
+ K_PAD0_RIGHTSTICK_CLICK,
+ K_PAD0_LEFTSHOULDER,
+ K_PAD0_RIGHTSHOULDER,
+ K_PAD0_DPAD_UP,
+ K_PAD0_DPAD_DOWN,
+ K_PAD0_DPAD_LEFT,
+ K_PAD0_DPAD_RIGHT,
+
+ K_PAD0_LEFTSTICK_LEFT,
+ K_PAD0_LEFTSTICK_RIGHT,
+ K_PAD0_LEFTSTICK_UP,
+ K_PAD0_LEFTSTICK_DOWN,
+ K_PAD0_RIGHTSTICK_LEFT,
+ K_PAD0_RIGHTSTICK_RIGHT,
+ K_PAD0_RIGHTSTICK_UP,
+ K_PAD0_RIGHTSTICK_DOWN,
+ K_PAD0_LEFTTRIGGER,
+ K_PAD0_RIGHTTRIGGER,
+
+ // Pseudo-key that brings the console down
+ K_CONSOLE,
+
MAX_KEYS
} keyNum_t;