]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - keys.h
add a helper function to release all keys "properly"
[xonotic/darkplaces.git] / keys.h
diff --git a/keys.h b/keys.h
index cd95805e921e0bdd6c2b818302f9c4646a4adcca..e471a235a74ceb3255e0ed5732e76f79d8d29ac8 100644 (file)
--- a/keys.h
+++ b/keys.h
@@ -34,6 +34,7 @@
 //
 typedef enum keynum_e
 {
+       K_TEXT                  = 1, // used only for unicode character input
        K_TAB                   = 9,
        K_ENTER                 = 13,
        K_ESCAPE                = 27,
@@ -187,6 +188,38 @@ typedef enum keynum_e
        K_AUX31,
        K_AUX32,
 
+       // Microsoft Xbox 360 Controller For Windows
+       K_X360_DPAD_UP,
+       K_X360_DPAD_DOWN,
+       K_X360_DPAD_LEFT,
+       K_X360_DPAD_RIGHT,
+       K_X360_START,
+       K_X360_BACK,
+       K_X360_LEFT_THUMB,
+       K_X360_RIGHT_THUMB,
+       K_X360_LEFT_SHOULDER,
+       K_X360_RIGHT_SHOULDER,
+       K_X360_A,
+       K_X360_B,
+       K_X360_X,
+       K_X360_Y,
+       K_X360_LEFT_TRIGGER,
+       K_X360_RIGHT_TRIGGER,
+       K_X360_LEFT_THUMB_UP,
+       K_X360_LEFT_THUMB_DOWN,
+       K_X360_LEFT_THUMB_LEFT,
+       K_X360_LEFT_THUMB_RIGHT,
+       K_X360_RIGHT_THUMB_UP,
+       K_X360_RIGHT_THUMB_DOWN,
+       K_X360_RIGHT_THUMB_LEFT,
+       K_X360_RIGHT_THUMB_RIGHT,
+
+       // generic joystick emulation for menu
+       K_JOY_UP,
+       K_JOY_DOWN,
+       K_JOY_LEFT,
+       K_JOY_RIGHT,
+
        K_MIDINOTE0 = 896, // to this, the note number is added
        K_MIDINOTE1,
        K_MIDINOTE2,
@@ -344,13 +377,16 @@ void Key_Init(void);
 void Key_Shutdown(void);
 void Key_Init_Cvars(void);
 void Key_Event(int key, int ascii, qboolean down);
-void Key_ClearStates (void);
-void Key_SetBinding (int keynum, int bindmap, const char *binding);
+void Key_ReleaseAll (void);
+void Key_ClearStates (void); // FIXME: should this function still exist? Or should Key_ReleaseAll be used instead when shutting down a vid driver?
 void Key_EventQueue_Block(void);
 void Key_EventQueue_Unblock(void);
 
+qboolean Key_SetBinding (int keynum, int bindmap, const char *binding);
 const char *Key_GetBind (int key, int bindmap);
 void Key_FindKeysForCommand (const char *command, int *keys, int numkeys, int bindmap);
+qboolean Key_SetBindMap(int fg, int bg);
+void Key_GetBindMap(int *fg, int *bg);
 
 #endif // __KEYS_H