diff options
author | Joel Challis <git@zvecr.com> | 2022-11-05 10:30:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 10:30:09 +0000 |
commit | a69ab05dd687cb9aa38e0c125e4f64956c7da6c7 (patch) | |
tree | 3733805ea012b5bc6ae7dc78dfed9f0f4d942d33 /quantum | |
parent | a070c4c50134cf274a674ee73227289fde81b8ed (diff) |
Initial DD keycode migration (#18643)
* Initial DD keycode migration
* Sort magic keycodes
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/action_code.h | 3 | ||||
-rw-r--r-- | quantum/keycode.h | 497 | ||||
-rw-r--r-- | quantum/keycodes.h | 1115 | ||||
-rw-r--r-- | quantum/keymap_common.c | 6 | ||||
-rw-r--r-- | quantum/process_keycode/process_joystick.c | 6 | ||||
-rw-r--r-- | quantum/process_keycode/process_magic.c | 270 | ||||
-rw-r--r-- | quantum/process_keycode/process_programmable_button.c | 4 | ||||
-rw-r--r-- | quantum/quantum_keycodes.h | 903 | ||||
-rw-r--r-- | quantum/send_string/send_string_keycodes.h | 61 | ||||
-rw-r--r-- | quantum/via.c | 1 | ||||
-rw-r--r-- | quantum/via.h | 11 | ||||
-rw-r--r-- | quantum/via_ensure_keycode.h | 344 |
12 files changed, 1342 insertions, 1879 deletions
diff --git a/quantum/action_code.h b/quantum/action_code.h index 14cfd025f1..58d929016d 100644 --- a/quantum/action_code.h +++ b/quantum/action_code.h @@ -179,6 +179,9 @@ enum mods_bit { MOD_RALT = 0x14, MOD_RGUI = 0x18, }; +#define MOD_HYPR (MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI) +#define MOD_MEH (MOD_LCTL | MOD_LSFT | MOD_LALT) + enum mods_codes { MODS_ONESHOT = 0x00, MODS_TAP_TOGGLE = 0x01, diff --git a/quantum/keycode.h b/quantum/keycode.h index 2e9a85ee66..45736e92f1 100644 --- a/quantum/keycode.h +++ b/quantum/keycode.h @@ -26,16 +26,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* FIXME: Add doxygen comments here */ -#define IS_ERROR(code) (KC_ROLL_OVER <= (code) && (code) <= KC_UNDEFINED) #define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) -#define IS_KEY(code) (KC_A <= (code) && (code) <= KC_EXSEL) -#define IS_MOD(code) (KC_LEFT_CTRL <= (code) && (code) <= KC_RIGHT_GUI) +#define IS_KEY(code) IS_BASIC_KEYCODE(code) +#define IS_MOD(code) IS_MODIFIERS_KEYCODE(code) -#define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF)) -#define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE) -#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_ASST) +#define IS_SYSTEM(code) IS_SYSTEM_KEYCODE(code) +#define IS_CONSUMER(code) IS_MEDIA_KEYCODE(code) -#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_ACCEL2) +#define IS_MOUSEKEY(code) IS_MOUSE_KEYCODE(code) #define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT) #define IS_MOUSEKEY_BUTTON(code) (KC_MS_BTN1 <= (code) && (code) <= KC_MS_BTN8) #define IS_MOUSEKEY_WHEEL(code) (KC_MS_WH_UP <= (code) && (code) <= KC_MS_WH_RIGHT) @@ -62,486 +60,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // clang-format off -/* - * Short names for ease of definition of keymap - */ -/* Transparent */ -#define KC_TRANSPARENT 0x01 -#define KC_TRNS KC_TRANSPARENT - -/* Punctuation */ -#define KC_ENT KC_ENTER -#define KC_ESC KC_ESCAPE -#define KC_BSPC KC_BACKSPACE -#define KC_SPC KC_SPACE -#define KC_MINS KC_MINUS -#define KC_EQL KC_EQUAL -#define KC_LBRC KC_LEFT_BRACKET -#define KC_RBRC KC_RIGHT_BRACKET -#define KC_BSLS KC_BACKSLASH -#define KC_NUHS KC_NONUS_HASH -#define KC_SCLN KC_SEMICOLON -#define KC_QUOT KC_QUOTE -#define KC_GRV KC_GRAVE -#define KC_COMM KC_COMMA -#define KC_SLSH KC_SLASH -#define KC_NUBS KC_NONUS_BACKSLASH - -/* Lock Keys */ -#define KC_CAPS KC_CAPS_LOCK -#define KC_SCRL KC_SCROLL_LOCK -#define KC_NUM KC_NUM_LOCK -#define KC_LCAP KC_LOCKING_CAPS_LOCK -#define KC_LNUM KC_LOCKING_NUM_LOCK -#define KC_LSCR KC_LOCKING_SCROLL_LOCK - -/* Commands */ -#define KC_PSCR KC_PRINT_SCREEN -#define KC_PAUS KC_PAUSE -#define KC_BRK KC_PAUSE -#define KC_INS KC_INSERT -#define KC_PGUP KC_PAGE_UP -#define KC_DEL KC_DELETE -#define KC_PGDN KC_PAGE_DOWN -#define KC_RGHT KC_RIGHT -#define KC_APP KC_APPLICATION -#define KC_EXEC KC_EXECUTE -#define KC_SLCT KC_SELECT -#define KC_AGIN KC_AGAIN -#define KC_PSTE KC_PASTE -#define KC_ERAS KC_ALTERNATE_ERASE -#define KC_SYRQ KC_SYSTEM_REQUEST -#define KC_CNCL KC_CANCEL -#define KC_CLR KC_CLEAR -#define KC_PRIR KC_PRIOR -#define KC_RETN KC_RETURN -#define KC_SEPR KC_SEPARATOR -#define KC_CLAG KC_CLEAR_AGAIN -#define KC_CRSL KC_CRSEL -#define KC_EXSL KC_EXSEL - -/* Keypad */ -#define KC_PSLS KC_KP_SLASH -#define KC_PAST KC_KP_ASTERISK -#define KC_PMNS KC_KP_MINUS -#define KC_PPLS KC_KP_PLUS -#define KC_PENT KC_KP_ENTER -#define KC_P1 KC_KP_1 -#define KC_P2 KC_KP_2 -#define KC_P3 KC_KP_3 -#define KC_P4 KC_KP_4 -#define KC_P5 KC_KP_5 -#define KC_P6 KC_KP_6 -#define KC_P7 KC_KP_7 -#define KC_P8 KC_KP_8 -#define KC_P9 KC_KP_9 -#define KC_P0 KC_KP_0 -#define KC_PDOT KC_KP_DOT -#define KC_PEQL KC_KP_EQUAL -#define KC_PCMM KC_KP_COMMA - -/* Language Specific */ -#define KC_INT1 KC_INTERNATIONAL_1 -#define KC_INT2 KC_INTERNATIONAL_2 -#define KC_INT3 KC_INTERNATIONAL_3 -#define KC_INT4 KC_INTERNATIONAL_4 -#define KC_INT5 KC_INTERNATIONAL_5 -#define KC_INT6 KC_INTERNATIONAL_6 -#define KC_INT7 KC_INTERNATIONAL_7 -#define KC_INT8 KC_INTERNATIONAL_8 -#define KC_INT9 KC_INTERNATIONAL_9 -#define KC_LNG1 KC_LANGUAGE_1 -#define KC_LNG2 KC_LANGUAGE_2 -#define KC_LNG3 KC_LANGUAGE_3 -#define KC_LNG4 KC_LANGUAGE_4 -#define KC_LNG5 KC_LANGUAGE_5 -#define KC_LNG6 KC_LANGUAGE_6 -#define KC_LNG7 KC_LANGUAGE_7 -#define KC_LNG8 KC_LANGUAGE_8 -#define KC_LNG9 KC_LANGUAGE_9 - -/* Modifiers */ -#define KC_LCTL KC_LEFT_CTRL -#define KC_LSFT KC_LEFT_SHIFT -#define KC_LALT KC_LEFT_ALT -#define KC_LOPT KC_LEFT_ALT -#define KC_LGUI KC_LEFT_GUI -#define KC_LCMD KC_LEFT_GUI -#define KC_LWIN KC_LEFT_GUI -#define KC_RCTL KC_RIGHT_CTRL -#define KC_RSFT KC_RIGHT_SHIFT -#define KC_RALT KC_RIGHT_ALT -#define KC_ALGR KC_RIGHT_ALT -#define KC_ROPT KC_RIGHT_ALT -#define KC_RGUI KC_RIGHT_GUI -#define KC_RCMD KC_RIGHT_GUI -#define KC_RWIN KC_RIGHT_GUI - -/* Generic Desktop Page (0x01) */ -#define KC_PWR KC_SYSTEM_POWER -#define KC_SLEP KC_SYSTEM_SLEEP -#define KC_WAKE KC_SYSTEM_WAKE - -/* Consumer Page (0x0C) */ -#define KC_MUTE KC_AUDIO_MUTE -#define KC_VOLU KC_AUDIO_VOL_UP -#define KC_VOLD KC_AUDIO_VOL_DOWN -#define KC_MNXT KC_MEDIA_NEXT_TRACK -#define KC_MPRV KC_MEDIA_PREV_TRACK -#define KC_MSTP KC_MEDIA_STOP -#define KC_MPLY KC_MEDIA_PLAY_PAUSE -#define KC_MSEL KC_MEDIA_SELECT -#define KC_EJCT KC_MEDIA_EJECT -#define KC_CALC KC_CALCULATOR -#define KC_MYCM KC_MY_COMPUTER -#define KC_WSCH KC_WWW_SEARCH -#define KC_WHOM KC_WWW_HOME -#define KC_WBAK KC_WWW_BACK -#define KC_WFWD KC_WWW_FORWARD -#define KC_WSTP KC_WWW_STOP -#define KC_WREF KC_WWW_REFRESH -#define KC_WFAV KC_WWW_FAVORITES -#define KC_MFFD KC_MEDIA_FAST_FORWARD -#define KC_MRWD KC_MEDIA_REWIND -#define KC_BRIU KC_BRIGHTNESS_UP -#define KC_BRID KC_BRIGHTNESS_DOWN -#define KC_CPNL KC_CONTROL_PANEL -#define KC_ASST KC_ASSISTANT - -/* System Specific */ -#define KC_BRMU KC_PAUSE -#define KC_BRMD KC_SCROLL_LOCK - -/* Mouse Keys */ -#define KC_MS_U KC_MS_UP -#define KC_MS_D KC_MS_DOWN -#define KC_MS_L KC_MS_LEFT -#define KC_MS_R KC_MS_RIGHT -#define KC_BTN1 KC_MS_BTN1 -#define KC_BTN2 KC_MS_BTN2 -#define KC_BTN3 KC_MS_BTN3 -#define KC_BTN4 KC_MS_BTN4 -#define KC_BTN5 KC_MS_BTN5 -#define KC_BTN6 KC_MS_BTN6 -#define KC_BTN7 KC_MS_BTN7 -#define KC_BTN8 KC_MS_BTN8 -#define KC_WH_U KC_MS_WH_UP -#define KC_WH_D KC_MS_WH_DOWN -#define KC_WH_L KC_MS_WH_LEFT -#define KC_WH_R KC_MS_WH_RIGHT -#define KC_ACL0 KC_MS_ACCEL0 -#define KC_ACL1 KC_MS_ACCEL1 -#define KC_ACL2 KC_MS_ACCEL2 - -// clang-format on - -/* Keyboard/Keypad Page (0x07) */ -enum hid_keyboard_keypad_usage { - KC_NO = 0x00, - KC_ROLL_OVER, - KC_POST_FAIL, - KC_UNDEFINED, - KC_A, - KC_B, - KC_C, - KC_D, - KC_E, - KC_F, - KC_G, - KC_H, - KC_I, - KC_J, - KC_K, - KC_L, - KC_M, // 0x10 - KC_N, - KC_O, - KC_P, - KC_Q, - KC_R, - KC_S, - KC_T, - KC_U, - KC_V, - KC_W, - KC_X, - KC_Y, - KC_Z, - KC_1, - KC_2, - KC_3, // 0x20 - KC_4, - KC_5, - KC_6, - KC_7, - KC_8, - KC_9, - KC_0, - KC_ENTER, - KC_ESCAPE, - KC_BACKSPACE, - KC_TAB, - KC_SPACE, - KC_MINUS, - KC_EQUAL, - KC_LEFT_BRACKET, - KC_RIGHT_BRACKET, // 0x30 - KC_BACKSLASH, - KC_NONUS_HASH, - KC_SEMICOLON, - KC_QUOTE, - KC_GRAVE, - KC_COMMA, - KC_DOT, - KC_SLASH, - KC_CAPS_LOCK, - KC_F1, - KC_F2, - KC_F3, - KC_F4, - KC_F5, - KC_F6, - KC_F7, // 0x40 - KC_F8, - KC_F9, - KC_F10, - KC_F11, - KC_F12, - KC_PRINT_SCREEN, - KC_SCROLL_LOCK, - KC_PAUSE, - KC_INSERT, - KC_HOME, - KC_PAGE_UP, - KC_DELETE, - KC_END, - KC_PAGE_DOWN, - KC_RIGHT, - KC_LEFT, // 0x50 - KC_DOWN, - KC_UP, - KC_NUM_LOCK, - KC_KP_SLASH, - KC_KP_ASTERISK, - KC_KP_MINUS, - KC_KP_PLUS, - KC_KP_ENTER, - KC_KP_1, - KC_KP_2, - KC_KP_3, - KC_KP_4, - KC_KP_5, - KC_KP_6, - KC_KP_7, - KC_KP_8, // 0x60 - KC_KP_9, - KC_KP_0, - KC_KP_DOT, - KC_NONUS_BACKSLASH, - KC_APPLICATION, - KC_KB_POWER, - KC_KP_EQUAL, - KC_F13, - KC_F14, - KC_F15, - KC_F16, - KC_F17, - KC_F18, - KC_F19, - KC_F20, - KC_F21, // 0x70 - KC_F22, - KC_F23, - KC_F24, - KC_EXECUTE, - KC_HELP, - KC_MENU, - KC_SELECT, - KC_STOP, - KC_AGAIN, - KC_UNDO, - KC_CUT, - KC_COPY, - KC_PASTE, - KC_FIND, - KC_KB_MUTE, - KC_KB_VOLUME_UP, // 0x80 - KC_KB_VOLUME_DOWN, - KC_LOCKING_CAPS_LOCK, - KC_LOCKING_NUM_LOCK, - KC_LOCKING_SCROLL_LOCK, - KC_KP_COMMA, - KC_KP_EQUAL_AS400, - KC_INTERNATIONAL_1, - KC_INTERNATIONAL_2, - KC_INTERNATIONAL_3, - KC_INTERNATIONAL_4, - KC_INTERNATIONAL_5, - KC_INTERNATIONAL_6, - KC_INTERNATIONAL_7, - KC_INTERNATIONAL_8, - KC_INTERNATIONAL_9, - KC_LANGUAGE_1, // 0x90 - KC_LANGUAGE_2, - KC_LANGUAGE_3, - KC_LANGUAGE_4, - KC_LANGUAGE_5, - KC_LANGUAGE_6, - KC_LANGUAGE_7, - KC_LANGUAGE_8, - KC_LANGUAGE_9, - KC_ALTERNATE_ERASE, - KC_SYSTEM_REQUEST, - KC_CANCEL, - KC_CLEAR, - KC_PRIOR, - KC_RETURN, - KC_SEPARATOR, - KC_OUT, // 0xA0 - KC_OPER, - KC_CLEAR_AGAIN, - KC_CRSEL, - KC_EXSEL, - -#if 0 - // *************************************************************** - // These keycodes are present in the HID spec, but are * - // nonfunctional on modern OSes. QMK uses this range (0xA5-0xDF) * - // for the media and function keys instead - see below. * - // *************************************************************** - - KC_KP_00 = 0xB0, - KC_KP_000, - KC_THOUSANDS_SEPARATOR, - KC_DECIMAL_SEPARATOR, - KC_CURRENCY_UNIT, - KC_CURRENCY_SUB_UNIT, - KC_KP_LEFT_PARENTHESIS, - KC_KP_RIGHT_PARENTHESIS, - KC_KP_LEFT_BRACE, - KC_KP_RIGHT_BRACE, - KC_KP_TAB, - KC_KP_BACKSPACE, - KC_KP_A, - KC_KP_B, - KC_KP_C, - KC_KP_D, - KC_KP_E, //0xC0 - KC_KP_F, - KC_KP_XOR, - KC_KP_HAT, - KC_KP_PERCENT, - KC_KP_LESS_THAN, - KC_KP_GREATER_THAN, - KC_KP_AND, - KC_KP_LAZY_AND, - KC_KP_OR, - KC_KP_LAZY_OR, - KC_KP_COLON, - KC_KP_HASH, - KC_KP_SPACE, - KC_KP_AT, - KC_KP_EXCLAMATION, - KC_KP_MEM_STORE, //0xD0 - KC_KP_MEM_RECALL, - KC_KP_MEM_CLEAR, - KC_KP_MEM_ADD, - KC_KP_MEM_SUB, - KC_KP_MEM_MUL, - KC_KP_MEM_DIV, - KC_KP_PLUS_MINUS, - KC_KP_CLEAR, - KC_KP_CLEAR_ENTRY, - KC_KP_BINARY, - KC_KP_OCTAL, - KC_KP_DECIMAL, - KC_KP_HEXADECIMAL, -#endif - - /* Modifiers */ - KC_LEFT_CTRL = 0xE0, - KC_LEFT_SHIFT, - KC_LEFT_ALT, - KC_LEFT_GUI, - KC_RIGHT_CTRL, - KC_RIGHT_SHIFT, - KC_RIGHT_ALT, - KC_RIGHT_GUI - - // ********************************************** - // * 0xF0-0xFF are unallocated in the HID spec. * - // * QMK uses these for Mouse Keys - see below. * - // ********************************************** -}; - -/* Media and Function keys */ -enum internal_special_keycodes { - /* Generic Desktop Page (0x01) */ - KC_SYSTEM_POWER = 0xA5, - KC_SYSTEM_SLEEP, - KC_SYSTEM_WAKE, - - /* Consumer Page (0x0C) */ - KC_AUDIO_MUTE, - KC_AUDIO_VOL_UP, - KC_AUDIO_VOL_DOWN, - KC_MEDIA_NEXT_TRACK, - KC_MEDIA_PREV_TRACK, - KC_MEDIA_STOP, - KC_MEDIA_PLAY_PAUSE, - KC_MEDIA_SELECT, - KC_MEDIA_EJECT, // 0xB0 - KC_MAIL, - KC_CALCULATOR, - KC_MY_COMPUTER, - KC_WWW_SEARCH, - KC_WWW_HOME, - KC_WWW_BACK, - KC_WWW_FORWARD, - KC_WWW_STOP, - KC_WWW_REFRESH, - KC_WWW_FAVORITES, - KC_MEDIA_FAST_FORWARD, - KC_MEDIA_REWIND, - KC_BRIGHTNESS_UP, - KC_BRIGHTNESS_DOWN, - KC_CONTROL_PANEL, - KC_ASSISTANT // 0xC0 -}; - -enum mouse_keys { -/* Mouse Buttons */ -#ifdef VIA_ENABLE - KC_MS_UP = 0xF0, -#else - KC_MS_UP = 0xCD, -#endif - KC_MS_DOWN, - KC_MS_LEFT, - KC_MS_RIGHT, - KC_MS_BTN1, - KC_MS_BTN2, - KC_MS_BTN3, - KC_MS_BTN4, - KC_MS_BTN5, -#ifdef VIA_ENABLE - KC_MS_BTN6 = KC_MS_BTN5, - KC_MS_BTN7 = KC_MS_BTN5, - KC_MS_BTN8 = KC_MS_BTN5, -#else - KC_MS_BTN6, - KC_MS_BTN7, - KC_MS_BTN8, -#endif - - /* Mouse Wheel */ - KC_MS_WH_UP, - KC_MS_WH_DOWN, - KC_MS_WH_LEFT, - KC_MS_WH_RIGHT, - - /* Acceleration */ - KC_MS_ACCEL0, - KC_MS_ACCEL1, - KC_MS_ACCEL2 // 0xDF, or 0xFF if via enabled -}; +// TODO: dd keycodes +#include "keycodes.h" diff --git a/quantum/keycodes.h b/quantum/keycodes.h new file mode 100644 index 0000000000..6772bb6a4a --- /dev/null +++ b/quantum/keycodes.h @@ -0,0 +1,1115 @@ +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +/******************************************************************************* + 88888888888 888 d8b .d888 d8b 888 d8b + 888 888 Y8P d88P" Y8P 888 Y8P + 888 888 888 888 + 888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b + 888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K + 888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b. + 888 888 888 888 X88 888 888 888 Y8b. 888 X88 + 888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P' + 888 888 + 888 888 + 888 888 + .d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888 + d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888 + 888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888 + Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888 + "Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888 + 888 + Y8b d88P + "Y88P" +*******************************************************************************/ + +#pragma once +// clang-format off + +enum qk_keycode_ranges { +// Ranges + QK_BASIC = 0x0000, + QK_BASIC_MAX = 0x00FF, + QK_MODS = 0x0100, + QK_MODS_MAX = 0x1FFF, + QK_MOD_TAP = 0x2000, + QK_MOD_TAP_MAX = 0x3FFF, + QK_LAYER_TAP = 0x4000, + QK_LAYER_TAP_MAX = 0x4FFF, + QK_LAYER_MOD = 0x5000, + QK_LAYER_MOD_MAX = 0x51FF, + QK_TO = 0x5200, + QK_TO_MAX = 0x521F, + QK_MOMENTARY = 0x5220, + QK_MOMENTARY_MAX = 0x523F, + QK_DEF_LAYER = 0x5240, + QK_DEF_LAYER_MAX = 0x525F, + QK_TOGGLE_LAYER = 0x5260, + QK_TOGGLE_LAYER_MAX = 0x527F, + QK_ONE_SHOT_LAYER = 0x5280, + QK_ONE_SHOT_LAYER_MAX = 0x529F, + QK_ONE_SHOT_MOD = 0x52A0, + QK_ONE_SHOT_MOD_MAX = 0x52BF, + QK_LAYER_TAP_TOGGLE = 0x52C0, + QK_LAYER_TAP_TOGGLE_MAX = 0x52DF, + QK_SWAP_HANDS = 0x5600, + QK_SWAP_HANDS_MAX = 0x56FF, + QK_TAP_DANCE = 0x5700, + QK_TAP_DANCE_MAX = 0x57FF, + QK_MAGIC = 0x7000, + QK_MAGIC_MAX = 0x70FF, + QK_MIDI = 0x7100, + QK_MIDI_MAX = 0x71FF, + QK_SEQUENCER = 0x7200, + QK_SEQUENCER_MAX = 0x73FF, + QK_JOYSTICK = 0x7400, + QK_JOYSTICK_MAX = 0x743F, + QK_PROGRAMMABLE_BUTTON = 0x7440, + QK_PROGRAMMABLE_BUTTON_MAX = 0x747F, + QK_AUDIO = 0x7480, + QK_AUDIO_MAX = 0x74BF, + QK_STENO = 0x74C0, + QK_STENO_MAX = 0x74FF, + QK_MACRO = 0x7700, + QK_MACRO_MAX = 0x777F, + QK_LIGHTING = 0x7800, + QK_LIGHTING_MAX = 0x78FF, + QK_QUANTUM = 0x7C00, + QK_QUANTUM_MAX = 0x7DFF, + QK_KB = 0x7E00, + QK_KB_MAX = 0x7EFF, + QK_USER = 0x7F00, + QK_USER_MAX = 0x7FFF, + QK_UNICODE = 0x8000, + QK_UNICODE_MAX = 0xFFFF, +}; + +enum qk_keycode_defines { +// Keycodes + KC_NO = 0x0000, + KC_TRANSPARENT = 0x0001, + KC_A = 0x0004, + KC_B = 0x0005, + KC_C = 0x0006, + KC_D = 0x0007, + KC_E = 0x0008, + KC_F = 0x0009, + KC_G = 0x000A, + KC_H = 0x000B, + KC_I = 0x000C, + KC_J = 0x000D, + KC_K = 0x000E, + KC_L = 0x000F, + KC_M = 0x0010, + KC_N = 0x0011, + KC_O = 0x0012, + KC_P = 0x0013, + KC_Q = 0x0014, + KC_R = 0x0015, + KC_S = 0x0016, + KC_T = 0x0017, + KC_U = 0x0018, + KC_V = 0x0019, + KC_W = 0x001A, + KC_X = 0x001B, + KC_Y = 0x001C, + KC_Z = 0x001D, + KC_1 = 0x001E, + KC_2 = 0x001F, + KC_3 = 0x0020, + KC_4 = 0x0021, + KC_5 = 0x0022, + KC_6 = 0x0023, + KC_7 = 0x0024, + KC_8 = 0x0025, + KC_9 = 0x0026, + KC_0 = 0x0027, + KC_ENTER = 0x0028, + KC_ESCAPE = 0x0029, + KC_BACKSPACE = 0x002A, + KC_TAB = 0x002B, + KC_SPACE = 0x002C, + KC_MINUS = 0x002D, + KC_EQUAL = 0x002E, + KC_LEFT_BRACKET = 0x002F, + KC_RIGHT_BRACKET = 0x0030, + KC_BACKSLASH = 0x0031, + KC_NONUS_HASH = 0x0032, + KC_SEMICOLON = 0x0033, + KC_QUOTE = 0x0034, + KC_GRAVE = 0x0035, + KC_COMMA = 0x0036, + KC_DOT = 0x0037, + KC_SLASH = 0x0038, + KC_CAPS_LOCK = 0x0039, + KC_F1 = 0x003A, + KC_F2 = 0x003B, + KC_F3 = 0x003C, + KC_F4 = 0x003D, + KC_F5 = 0x003E, + KC_F6 = 0x003F, + KC_F7 = 0x0040, + KC_F8 = 0x0041, + KC_F9 = 0x0042, + KC_F10 = 0x0043, + KC_F11 = 0x0044, + KC_F12 = 0x0045, + KC_PRINT_SCREEN = 0x0046, + KC_SCROLL_LOCK = 0x0047, + KC_PAUSE = 0x0048, + KC_INSERT = 0x0049, + KC_HOME = 0x004A, + KC_PAGE_UP = 0x004B, + KC_DELETE = 0x004C, + KC_END = 0x004D, + KC_PAGE_DOWN = 0x004E, + KC_RIGHT = 0x004F, + KC_LEFT = 0x0050, + KC_DOWN = 0x0051, + KC_UP = 0x0052, + KC_NUM_LOCK = 0x0053, + KC_KP_SLASH = 0x0054, + KC_KP_ASTERISK = 0x0055, + KC_KP_MINUS = 0x0056, + KC_KP_PLUS = 0x0057, + KC_KP_ENTER = 0x0058, + KC_KP_1 = 0x0059, + KC_KP_2 = 0x005A, + KC_KP_3 = 0x005B, + KC_KP_4 = 0x005C, + KC_KP_5 = 0x005D, + KC_KP_6 = 0x005E, + KC_KP_7 = 0x005F, + KC_KP_8 = 0x0060, + KC_KP_9 = 0x0061, + KC_KP_0 = 0x0062, + KC_KP_DOT = 0x0063, + KC_NONUS_BACKSLASH = 0x0064, + KC_APPLICATION = 0x0065, + KC_KB_POWER = 0x0066, + KC_KP_EQUAL = 0x0067, + KC_F13 = 0x0068, + KC_F14 = 0x0069, + KC_F15 = 0x006A, + KC_F16 = 0x006B, + KC_F17 = 0x006C, + KC_F18 = 0x006D, + KC_F19 = 0x006E, + KC_F20 = 0x006F, + KC_F21 = 0x0070, + KC_F22 = 0x0071, + KC_F23 = 0x0072, + KC_F24 = 0x0073, + KC_EXECUTE = 0x0074, + KC_HELP = 0x0075, + KC_MENU = 0x0076, + KC_SELECT = 0x0077, + KC_STOP = 0x0078, + KC_AGAIN = 0x0079, + KC_UNDO = 0x007A, + KC_CUT = 0x007B, + KC_COPY = 0x007C, + KC_PASTE = 0x007D, + KC_FIND = 0x007E, + KC_KB_MUTE = 0x007F, + KC_KB_VOLUME_UP = 0x0080, + KC_KB_VOLUME_DOWN = 0x0081, + KC_LOCKING_CAPS_LOCK = 0x0082, + KC_LOCKING_NUM_LOCK = 0x0083, + KC_LOCKING_SCROLL_LOCK = 0x0084, + KC_KP_COMMA = 0x0085, + KC_KP_EQUAL_AS400 = 0x0086, + KC_INTERNATIONAL_1 = 0x0087, + KC_INTERNATIONAL_2 = 0x0088, + KC_INTERNATIONAL_3 = 0x0089, + KC_INTERNATIONAL_4 = 0x008A, + KC_INTERNATIONAL_5 = 0x008B, + KC_INTERNATIONAL_6 = 0x008C, + KC_INTERNATIONAL_7 = 0x008D, + KC_INTERNATIONAL_8 = 0x008E, + KC_INTERNATIONAL_9 = 0x008F, + KC_LANGUAGE_1 = 0x0090, + KC_LANGUAGE_2 = 0x0091, + KC_LANGUAGE_3 = 0x0092, + KC_LANGUAGE_4 = 0x0093, + KC_LANGUAGE_5 = 0x0094, + KC_LANGUAGE_6 = 0x0095, + KC_LANGUAGE_7 = 0x0096, + KC_LANGUAGE_8 = 0x0097, + KC_LANGUAGE_9 = 0x0098, + KC_ALTERNATE_ERASE = 0x0099, + KC_SYSTEM_REQUEST = 0x009A, + KC_CANCEL = 0x009B, + KC_CLEAR = 0x009C, + KC_PRIOR = 0x009D, + KC_RETURN = 0x009E, + KC_SEPARATOR = 0x009F, + KC_OUT = 0x00A0, + KC_OPER = 0x00A1, + KC_CLEAR_AGAIN = 0x00A2, + KC_CRSEL = 0x00A3, + KC_EXSEL = 0x00A4, + KC_SYSTEM_POWER = 0x00A5, + KC_SYSTEM_SLEEP = 0x00A6, + KC_SYSTEM_WAKE = 0x00A7, + KC_AUDIO_MUTE = 0x00A8, + KC_AUDIO_VOL_UP = 0x00A9, + KC_AUDIO_VOL_DOWN = 0x00AA, + KC_MEDIA_NEXT_TRACK = 0x00AB, + KC_MEDIA_PREV_TRACK = 0x00AC, + KC_MEDIA_STOP = 0x00AD, + KC_MEDIA_PLAY_PAUSE = 0x00AE, + KC_MEDIA_SELECT = 0x00AF, + KC_MEDIA_EJECT = 0x00B0, + KC_MAIL = 0x00B1, + KC_CALCULATOR = 0x00B2, + KC_MY_COMPUTER = 0x00B3, + KC_WWW_SEARCH = 0x00B4, + KC_WWW_HOME = 0x00B5, + KC_WWW_BACK = 0x00B6, + KC_WWW_FORWARD = 0x00B7, + KC_WWW_STOP = 0x00B8, + KC_WWW_REFRESH = 0x00B9, + KC_WWW_FAVORITES = 0x00BA, + KC_MEDIA_FAST_FORWARD = 0x00BB, + KC_MEDIA_REWIND = 0x00BC, + KC_BRIGHTNESS_UP = 0x00BD, + KC_BRIGHTNESS_DOWN = 0x00BE, + KC_CONTROL_PANEL = 0x00BF, + KC_ASSISTANT = 0x00C0, + KC_MS_UP = 0x00CD, + KC_MS_DOWN = 0x00CE, + KC_MS_LEFT = 0x00CF, + KC_MS_RIGHT = 0x00D0, + KC_MS_BTN1 = 0x00D1, + KC_MS_BTN2 = 0x00D2, + KC_MS_BTN3 = 0x00D3, + KC_MS_BTN4 = 0x00D4, + KC_MS_BTN5 = 0x00D5, + KC_MS_BTN6 = 0x00D6, + KC_MS_BTN7 = 0x00D7, + KC_MS_BTN8 = 0x00D8, + KC_MS_WH_UP = 0x00D9, + KC_MS_WH_DOWN = 0x00DA, + KC_MS_WH_LEFT = 0x00DB, + KC_MS_WH_RIGHT = 0x00DC, + KC_MS_ACCEL0 = 0x00DD, + KC_MS_ACCEL1 = 0x00DE, + KC_MS_ACCEL2 = 0x00DF, + KC_LEFT_CTRL = 0x00E0, + KC_LEFT_SHIFT = 0x00E1, + KC_LEFT_ALT = 0x00E2, + KC_LEFT_GUI = 0x00E3, + KC_RIGHT_CTRL = 0x00E4, + KC_RIGHT_SHIFT = 0x00E5, + KC_RIGHT_ALT = 0x00E6, + KC_RIGHT_GUI = 0x00E7, + SH_TG = 0x56F0, + SH_TT = 0x56F1, + SH_MON = 0x56F2, + SH_MOFF = 0x56F3, + SH_OFF = 0x56F4, + SH_ON = 0x56F5, + SH_OS = 0x56F6, + MAGIC_SWAP_CONTROL_CAPSLOCK = 0x7000, + MAGIC_UNSWAP_CONTROL_CAPSLOCK = 0x7001, + MAGIC_TOGGLE_CONTROL_CAPSLOCK = 0x7002, + MAGIC_UNCAPSLOCK_TO_CONTROL = 0x7003, + MAGIC_CAPSLOCK_TO_CONTROL = 0x7004, + MAGIC_SWAP_LALT_LGUI = 0x7005, + MAGIC_UNSWAP_LALT_LGUI = 0x7006, + MAGIC_SWAP_RALT_RGUI = 0x7007, + MAGIC_UNSWAP_RALT_RGUI = 0x7008, + MAGIC_UNNO_GUI = 0x7009, + MAGIC_NO_GUI = 0x700A, + MAGIC_TOGGLE_GUI = 0x700B, + MAGIC_SWAP_GRAVE_ESC = 0x700C, + MAGIC_UNSWAP_GRAVE_ESC = 0x700D, + MAGIC_SWAP_BACKSLASH_BACKSPACE = 0x700E, + MAGIC_UNSWAP_BACKSLASH_BACKSPACE = 0x700F, + MAGIC_TOGGLE_BACKSLASH_BACKSPACE = 0x7010, + MAGIC_HOST_NKRO = 0x7011, + MAGIC_UNHOST_NKRO = 0x7012, + MAGIC_TOGGLE_NKRO = 0x7013, + MAGIC_SWAP_ALT_GUI = 0x7014, + MAGIC_UNSWAP_ALT_GUI = 0x7015, + MAGIC_TOGGLE_ALT_GUI = 0x7016, + MAGIC_SWAP_LCTL_LGUI = 0x7017, + MAGIC_UNSWAP_LCTL_LGUI = 0x7018, + MAGIC_SWAP_RCTL_RGUI = 0x7019, + MAGIC_UNSWAP_RCTL_RGUI = 0x701A, + MAGIC_SWAP_CTL_GUI = 0x701B, + MAGIC_UNSWAP_CTL_GUI = 0x701C, + MAGIC_TOGGLE_CTL_GUI = 0x701D, + MAGIC_EE_HANDS_LEFT = 0x701E, + MAGIC_EE_HANDS_RIGHT = 0x701F, + MAGIC_SWAP_ESCAPE_CAPSLOCK = 0x7020, + MAGIC_UNSWAP_ESCAPE_CAPSLOCK = 0x7021, + MAGIC_TOGGLE_ESCAPE_CAPSLOCK = 0x7022, + MI_ON = 0x7100, + MI_OFF = 0x7101, + MI_TOG = 0x7102, + MI_C = 0x7110, + MI_Cs = 0x7111, + MI_D = 0x7112, + MI_Ds = 0x7113, + MI_E = 0x7114, + MI_F = 0x7115, + MI_Fs = 0x7116, + MI_G = 0x7117, + MI_Gs = 0x7118, + MI_A = 0x7119, + MI_As = 0x711A, + MI_B = 0x711B, + MI_C_1 = 0x7120, + MI_Cs_1 = 0x7121, + MI_D_1 = 0x7122, + MI_Ds_1 = 0x7123, + MI_E_1 = 0x7124, + MI_F_1 = 0x7125, + MI_Fs_1 = 0x7126, + MI_G_1 = 0x7127, + MI_Gs_1 = 0x7128, + MI_A_1 = 0x7129, + MI_As_1 = 0x712A, + MI_B_1 = 0x712B, + MI_C_2 = 0x7130, + MI_Cs_2 = 0x7131, + MI_D_2 = 0x7132, + MI_Ds_2 = 0x7133, + MI_E_2 = 0x7134, + MI_F_2 = 0x7135, + MI_Fs_2 = 0x7136, + MI_G_2 = 0x7137, + MI_Gs_2 = 0x7138, + MI_A_2 = 0x7139, + MI_As_2 = 0x713A, + MI_B_2 = 0x713B, + MI_C_3 = 0x7140, + MI_Cs_3 = 0x7141, + MI_D_3 = 0x7142, + MI_Ds_3 = 0x7143, + MI_E_3 = 0x7144, + MI_F_3 = 0x7145, + MI_Fs_3 = 0x7146, + MI_G_3 = 0x7147, + MI_Gs_3 = 0x7148, + MI_A_3 = 0x7149, + MI_As_3 = 0x714A, + MI_B_3 = 0x714B, + MI_C_4 = 0x7150, + MI_Cs_4 = 0x7151, + MI_D_4 = 0x7152, + MI_Ds_4 = 0x7153, + MI_E_4 = 0x7154, + MI_F_4 = 0x7155, + MI_Fs_4 = 0x7156, + MI_G_4 = 0x7157, + MI_Gs_4 = 0x7158, + MI_A_4 = 0x7159, + MI_As_4 = 0x715A, + MI_B_4 = 0x715B, + MI_C_5 = 0x7160, + MI_Cs_5 = 0x7161, + MI_D_5 = 0x7162, + MI_Ds_5 = 0x7163, + MI_E_5 = 0x7164, + MI_F_5 = 0x7165, + MI_Fs_5 = 0x7166, + MI_G_5 = 0x7167, + MI_Gs_5 = 0x7168, + MI_A_5 = 0x7169, + MI_As_5 = 0x716A, + MI_B_5 = 0x716B, + MI_OCT_N2 = 0x7170, + MI_OCT_N1 = 0x7171, + MI_OCT_0 = 0x7172, + MI_OCT_1 = 0x7173, + MI_OCT_2 = 0x7174, + MI_OCT_3 = 0x7175, + MI_OCT_4 = 0x7176, + MI_OCT_5 = 0x7177, + MI_OCT_6 = 0x7178, + MI_OCT_7 = 0x7179, + MI_OCTD = 0x717A, + MI_OCTU = 0x717B, + MI_TRNS_N6 = 0x7180, + MI_TRNS_N5 = 0x7181, + MI_TRNS_N4 = 0x7182, + MI_TRNS_N3 = 0x7183, + MI_TRNS_N2 = 0x7184, + MI_TRNS_N1 = 0x7185, + MI_TRNS_0 = 0x7186, + MI_TRNS_1 = 0x7187, + MI_TRNS_2 = 0x7188, + MI_TRNS_3 = 0x7189, + MI_TRNS_4 = 0x718A, + MI_TRNS_5 = 0x718B, + MI_TRNS_6 = 0x718C, + MI_TRNSD = 0x718D, + MI_TRNSU = 0x718E, + MI_VEL_0 = 0x7190, + MI_VEL_1 = 0x7191, + MI_VEL_2 = 0x7192, + MI_VEL_3 = 0x7193, + MI_VEL_4 = 0x7194, + MI_VEL_5 = 0x7195, + MI_VEL_6 = 0x7196, + MI_VEL_7 = 0x7197, + MI_VEL_8 = 0x7198, + MI_VEL_9 = 0x7199, + MI_VEL_10 = 0x719A, + MI_VELD = 0x719B, + MI_VELU = 0x719C, + MI_CH1 = 0x71A0, + MI_CH2 = 0x71A1, + MI_CH3 = 0x71A2, + MI_CH4 = 0x71A3, + MI_CH5 = 0x71A4, + MI_CH6 = 0x71A5, + MI_CH7 = 0x71A6, + MI_CH8 = 0x71A7, + MI_CH9 = 0x71A8, + MI_CH10 = 0x71A9, + MI_CH11 = 0x71AA, + MI_CH12 = 0x71AB, + MI_CH13 = 0x71AC, + MI_CH14 = 0x71AD, + MI_CH15 = 0x71AE, + MI_CH16 = 0x71AF, + MI_CHD = 0x71B0, + MI_CHU = 0x71B1, + MI_ALLOFF = 0x71C0, + MI_SUS = 0x71C1, + MI_PORT = 0x71C2, + MI_SOST = 0x71C3, + MI_SOFT = 0x71C4, + MI_LEG = 0x71C5, + MI_MOD = 0x71C6, + MI_MODSD = 0x71C7, + MI_MODSU = 0x71C8, + MI_BENDD = 0x71C9, + MI_BENDU = 0x71CA, + SQ_ON = 0x7200, + SQ_OFF = 0x7201, + SQ_TOG = 0x7202, + SQ_TMPD = 0x7203, + SQ_TMPU = 0x7204, + SQ_RESD = 0x7205, + SQ_RESU = 0x7206, + SQ_SALL = 0x7207, + SQ_SCLR = 0x7208, + QK_JOYSTICK_BUTTON_0 = 0x7400, + QK_JOYSTICK_BUTTON_1 = 0x7401, + QK_JOYSTICK_BUTTON_2 = 0x7402, + QK_JOYSTICK_BUTTON_3 = 0x7403, + QK_JOYSTICK_BUTTON_4 = 0x7404, + QK_JOYSTICK_BUTTON_5 = 0x7405, + QK_JOYSTICK_BUTTON_6 = 0x7406, + QK_JOYSTICK_BUTTON_7 = 0x7407, + QK_JOYSTICK_BUTTON_8 = 0x7408, + QK_JOYSTICK_BUTTON_9 = 0x7409, + QK_JOYSTICK_BUTTON_10 = 0x740A, + QK_JOYSTICK_BUTTON_11 = 0x740B, + QK_JOYSTICK_BUTTON_12 = 0x740C, + QK_JOYSTICK_BUTTON_13 = 0x740D, + QK_JOYSTICK_BUTTON_14 = 0x740E, + QK_JOYSTICK_BUTTON_15 = 0x740F, + QK_JOYSTICK_BUTTON_16 = 0x7410, + QK_JOYSTICK_BUTTON_17 = 0x7411, + QK_JOYSTICK_BUTTON_18 = 0x7412, + QK_JOYSTICK_BUTTON_19 = 0x7413, + QK_JOYSTICK_BUTTON_20 = 0x7414, + QK_JOYSTICK_BUTTON_21 = 0x7415, + QK_JOYSTICK_BUTTON_22 = 0x7416, + QK_JOYSTICK_BUTTON_23 = 0x7417, + QK_JOYSTICK_BUTTON_24 = 0x7418, + QK_JOYSTICK_BUTTON_25 = 0x7419, + QK_JOYSTICK_BUTTON_26 = 0x741A, + QK_JOYSTICK_BUTTON_27 = 0x741B, + QK_JOYSTICK_BUTTON_28 = 0x741C, + QK_JOYSTICK_BUTTON_29 = 0x741D, + QK_JOYSTICK_BUTTON_30 = 0x741E, + QK_JOYSTICK_BUTTON_31 = 0x741F, + QK_PROGRAMMABLE_BUTTON_1 = 0x7440, + QK_PROGRAMMABLE_BUTTON_2 = 0x7441, + QK_PROGRAMMABLE_BUTTON_3 = 0x7442, + QK_PROGRAMMABLE_BUTTON_4 = 0x7443, + QK_PROGRAMMABLE_BUTTON_5 = 0x7444, + QK_PROGRAMMABLE_BUTTON_6 = 0x7445, + QK_PROGRAMMABLE_BUTTON_7 = 0x7446, + QK_PROGRAMMABLE_BUTTON_8 = 0x7447, + QK_PROGRAMMABLE_BUTTON_9 = 0x7448, + QK_PROGRAMMABLE_BUTTON_10 = 0x7449, + QK_PROGRAMMABLE_BUTTON_11 = 0x744A, + QK_PROGRAMMABLE_BUTTON_12 = 0x744B, + QK_PROGRAMMABLE_BUTTON_13 = 0x744C, + QK_PROGRAMMABLE_BUTTON_14 = 0x744D, + QK_PROGRAMMABLE_BUTTON_15 = 0x744E, + QK_PROGRAMMABLE_BUTTON_16 = 0x744F, + QK_PROGRAMMABLE_BUTTON_17 = 0x7450, + QK_PROGRAMMABLE_BUTTON_18 = 0x7451, + QK_PROGRAMMABLE_BUTTON_19 = 0x7452, + QK_PROGRAMMABLE_BUTTON_20 = 0x7453, + QK_PROGRAMMABLE_BUTTON_21 = 0x7454, + QK_PROGRAMMABLE_BUTTON_22 = 0x7455, + QK_PROGRAMMABLE_BUTTON_23 = 0x7456, + QK_PROGRAMMABLE_BUTTON_24 = 0x7457, + QK_PROGRAMMABLE_BUTTON_25 = 0x7458, + QK_PROGRAMMABLE_BUTTON_26 = 0x7459, + QK_PROGRAMMABLE_BUTTON_27 = 0x745A, + QK_PROGRAMMABLE_BUTTON_28 = 0x745B, + QK_PROGRAMMABLE_BUTTON_29 = 0x745C, + QK_PROGRAMMABLE_BUTTON_30 = 0x745D, + QK_PROGRAMMABLE_BUTTON_31 = 0x745E, + QK_PROGRAMMABLE_BUTTON_32 = 0x745F, + AU_ON = 0x7480, + AU_OFF = 0x7481, + AU_TOG = 0x7482, + CLICKY_TOGGLE = 0x748A, + CLICKY_ENABLE = 0x748B, + CLICKY_DISABLE = 0x748C, + CLICKY_UP = 0x748D, + CLICKY_DOWN = 0x748E, |