From 84cff64f992d5099a0c40fe5ad948f77fd772cf2 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 22 Mar 2020 11:18:44 +0900 Subject: [PATCH] Remove many key number hard-codings I left the ones below 256 alone (some were necessary anyway), but above 256 they were almost entirely sequential, which rather defeats the purpose of using an enum, especially since it makes it difficult to expand sections. --- include/QF/keys.h | 126 +++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/include/QF/keys.h b/include/QF/keys.h index 7c9c959fd..bdf32f6f0 100644 --- a/include/QF/keys.h +++ b/include/QF/keys.h @@ -227,77 +227,77 @@ typedef enum { /* Numeric keypad */ QFK_KP0 = 256, - QFK_KP1 = 257, - QFK_KP2 = 258, - QFK_KP3 = 259, - QFK_KP4 = 260, - QFK_KP5 = 261, - QFK_KP6 = 262, - QFK_KP7 = 263, - QFK_KP8 = 264, - QFK_KP9 = 265, - QFK_KP_PERIOD = 266, - QFK_KP_DIVIDE = 267, - QFK_KP_MULTIPLY = 268, - QFK_KP_MINUS = 269, - QFK_KP_PLUS = 270, - QFK_KP_ENTER = 271, - QFK_KP_EQUALS = 272, + QFK_KP1, + QFK_KP2, + QFK_KP3, + QFK_KP4, + QFK_KP5, + QFK_KP6, + QFK_KP7, + QFK_KP8, + QFK_KP9, + QFK_KP_PERIOD, + QFK_KP_DIVIDE, + QFK_KP_MULTIPLY, + QFK_KP_MINUS, + QFK_KP_PLUS, + QFK_KP_ENTER, + QFK_KP_EQUALS, /* Arrows + Home/End pad */ - QFK_UP = 273, - QFK_DOWN = 274, - QFK_RIGHT = 275, - QFK_LEFT = 276, - QFK_INSERT = 277, - QFK_HOME = 278, - QFK_END = 279, - QFK_PAGEUP = 280, - QFK_PAGEDOWN = 281, + QFK_UP, + QFK_DOWN, + QFK_RIGHT, + QFK_LEFT, + QFK_INSERT, + QFK_HOME, + QFK_END, + QFK_PAGEUP, + QFK_PAGEDOWN, /* Function keys */ - QFK_F1 = 282, - QFK_F2 = 283, - QFK_F3 = 284, - QFK_F4 = 285, - QFK_F5 = 286, - QFK_F6 = 287, - QFK_F7 = 288, - QFK_F8 = 289, - QFK_F9 = 290, - QFK_F10 = 291, - QFK_F11 = 292, - QFK_F12 = 293, - QFK_F13 = 294, - QFK_F14 = 295, - QFK_F15 = 296, + QFK_F1, + QFK_F2, + QFK_F3, + QFK_F4, + QFK_F5, + QFK_F6, + QFK_F7, + QFK_F8, + QFK_F9, + QFK_F10, + QFK_F11, + QFK_F12, + QFK_F13, + QFK_F14, + QFK_F15, /* Key state modifier keys */ - QFK_NUMLOCK = 300, - QFK_CAPSLOCK = 301, - QFK_SCROLLOCK = 302, - QFK_RSHIFT = 303, - QFK_LSHIFT = 304, - QFK_RCTRL = 305, - QFK_LCTRL = 306, - QFK_RALT = 307, - QFK_LALT = 308, - QFK_RMETA = 309, - QFK_LMETA = 310, - QFK_LSUPER = 311, /* Left "Windows" key */ - QFK_RSUPER = 312, /* Right "Windows" key */ - QFK_MODE = 313, /* "Alt Gr" key */ - QFK_COMPOSE = 314, /* Multi-key compose key */ + QFK_NUMLOCK, + QFK_CAPSLOCK, + QFK_SCROLLOCK, + QFK_RSHIFT, + QFK_LSHIFT, + QFK_RCTRL, + QFK_LCTRL, + QFK_RALT, + QFK_LALT, + QFK_RMETA, + QFK_LMETA, + QFK_LSUPER, /* Left "Windows" key */ + QFK_RSUPER, /* Right "Windows" key */ + QFK_MODE, /* "Alt Gr" key */ + QFK_COMPOSE, /* Multi-key compose key */ /* Miscellaneous function keys */ - QFK_HELP = 315, - QFK_PRINT = 316, - QFK_SYSREQ = 317, - QFK_BREAK = 318, - QFK_MENU = 319, - QFK_POWER = 320, /* Power Macintosh power key */ - QFK_EURO = 321, /* Some european keyboards */ - QFK_UNDO = 322, + QFK_HELP, + QFK_PRINT, + QFK_SYSREQ, + QFK_BREAK, + QFK_MENU, + QFK_POWER, /* Power Macintosh power key */ + QFK_EURO, /* Some european keyboards */ + QFK_UNDO, /* Japanese keys */ QFK_KANJI, /* Kanji, Kanji convert */