summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-11-05 10:30:09 +0000
committerGitHub <noreply@github.com>2022-11-05 10:30:09 +0000
commita69ab05dd687cb9aa38e0c125e4f64956c7da6c7 (patch)
tree3733805ea012b5bc6ae7dc78dfed9f0f4d942d33 /quantum
parenta070c4c50134cf274a674ee73227289fde81b8ed (diff)
Initial DD keycode migration (#18643)
* Initial DD keycode migration * Sort magic keycodes
Diffstat (limited to 'quantum')
-rw-r--r--quantum/action_code.h3
-rw-r--r--quantum/keycode.h497
-rw-r--r--quantum/keycodes.h1115
-rw-r--r--quantum/keymap_common.c6
-rw-r--r--quantum/process_keycode/process_joystick.c6
-rw-r--r--quantum/process_keycode/process_magic.c270
-rw-r--r--quantum/process_keycode/process_programmable_button.c4
-rw-r--r--quantum/quantum_keycodes.h903
-rw-r--r--quantum/send_string/send_string_keycodes.h61
-rw-r--r--quantum/via.c1
-rw-r--r--quantum/via.h11
-rw-r--r--quantum/via_ensure_keycode.h344
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,
+ CLICKY_RESET = 0x748F,
+ MU_ON = 0x7490,
+ MU_OFF = 0x7491,
+ MU_TOG = 0x7492,
+ MU_MOD = 0x7493,
+ MUV_IN = 0x7494,
+ MUV_DE = 0x7495,
+ QK_STENO_BOLT = 0x74F0,
+ QK_STENO_GEMINI = 0x74F1,
+ QK_STENO_COMB = 0x74F2,
+ QK_STENO_COMB_MAX = 0x74FC,
+ MACRO_0 = 0x7700,
+ MACRO_1 = 0x7701,
+ MACRO_2 = 0x7702,
+ MACRO_3 = 0x7703,
+ MACRO_4 = 0x7704,
+ MACRO_5 = 0x7705,
+ MACRO_6 = 0x7706,
+ MACRO_7 = 0x7707,
+ MACRO_8 = 0x7708,
+ MACRO_9 = 0x7709,
+ MACRO_10 = 0x770A,
+ MACRO_11 = 0x770B,
+ MACRO_12 = 0x770C,
+ MACRO_13 = 0x770D,
+ MACRO_14 = 0x770E,
+ MACRO_15 = 0x770F,
+ MACRO_16 = 0x7710,
+ MACRO_17 = 0x7711,
+ MACRO_18 = 0x7712,
+ MACRO_19 = 0x7713,
+ MACRO_20 = 0x7714,
+ MACRO_21 = 0x7715,
+ MACRO_22 = 0x7716,
+ MACRO_23 = 0x7717,
+ MACRO_24 = 0x7718,
+ MACRO_25 = 0x7719,
+ MACRO_26 = 0x771A,
+ MACRO_27 = 0x771B,
+ MACRO_28 = 0x771C,
+ MACRO_29 = 0x771D,
+ MACRO_30 = 0x771E,
+ MACRO_31 = 0x771F,
+ BL_ON = 0x7800,
+ BL_OFF = 0x7801,
+ BL_DEC = 0x7802,
+ BL_INC = 0x7803,
+ BL_TOGG = 0x7804,
+ BL_STEP = 0x7805,
+ BL_BRTG = 0x7806,
+ RGB_TOG = 0x7820,
+ RGB_MODE_FORWARD = 0x7821,
+ RGB_MODE_REVERSE = 0x7822,
+ RGB_HUI = 0x7823,
+ RGB_HUD = 0x7824,
+ RGB_SAI = 0x7825,
+ RGB_SAD = 0x7826,
+ RGB_VAI = 0x7827,
+ RGB_VAD = 0x7828,
+ RGB_SPI = 0x7829,
+ RGB_SPD = 0x782A,
+ RGB_MODE_PLAIN = 0x782B,
+ RGB_MODE_BREATHE = 0x782C,
+ RGB_MODE_RAINBOW = 0x782D,
+ RGB_MODE_SWIRL = 0x782E,
+ RGB_MODE_SNAKE = 0x782F,
+ RGB_MODE_KNIGHT = 0x7830,
+ RGB_MODE_XMAS = 0x7831,
+ RGB_MODE_GRADIENT = 0x7832,
+ RGB_MODE_RGBTEST = 0x7833,
+ RGB_MODE_TWINKLE = 0x7834,
+ QK_BOOTLOADER = 0x7C00,
+ QK_REBOOT = 0x7C01,
+ QK_DEBUG_TOGGLE = 0x7C02,
+ QK_CLEAR_EEPROM = 0x7C03,
+ QK_MAKE = 0x7C04,
+ QK_AUTO_SHIFT_DOWN = 0x7C10,
+ QK_AUTO_SHIFT_UP = 0x7C11,
+ QK_AUTO_SHIFT_REPORT = 0x7C12,
+ QK_AUTO_SHIFT_ON = 0x7C13,
+ QK_AUTO_SHIFT_OFF = 0x7C14,
+ QK_AUTO_SHIFT_TOGGLE = 0x7C15,
+ QK_GRAVE_ESCAPE = 0x7C16,
+ QK_VELOCIKEY_TOGGLE = 0x7C17,
+ QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN = 0x7C18,
+ QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE = 0x7C19,
+ QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN = 0x7C1A,
+ QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE = 0x7C1B,
+ QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN = 0x7C1C,
+ QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE = 0x7C1D,
+ QK_SPACE_CADET_RIGHT_SHIFT_ENTER = 0x7C1E,
+ OUT_AUTO = 0x7C20,
+ OUT_USB = 0x7C21,
+ OUT_BT = 0x7C22,
+ QK_UNICODE_MODE_NEXT = 0x7C30,
+ QK_UNICODE_MODE_PREVIOUS = 0x7C31,
+ QK_UNICODE_MODE_MACOS = 0x7C32,
+ QK_UNICODE_MODE_LINUX = 0x7C33,
+ QK_UNICODE_MODE_WINDOWS = 0x7C34,
+ QK_UNICODE_MODE_BSD = 0x7C35,
+ QK_UNICODE_MODE_WINCOMPOSE = 0x7C36,
+ QK_UNICODE_MODE_EMACS = 0x7C37,
+ HPT_ON = 0x7C40,
+ HPT_OFF = 0x7C41,
+ HPT_TOG = 0x7C42,
+ HPT_RST = 0x7C43,
+ HPT_FBK = 0x7C44,
+ HPT_BUZ = 0x7C45,
+ HPT_MODI = 0x7C46,
+ HPT_MODD = 0x7C47,
+ HPT_CONT = 0x7C48,
+ HPT_CONI = 0x7C49,
+ HPT_COND = 0x7C4A,
+ HPT_DWLI = 0x7C4B,
+ HPT_DWLD = 0x7C4C,
+ QK_COMBO_ON = 0x7C50,
+ QK_COMBO_OFF = 0x7C51,
+ QK_COMBO_TOGGLE = 0x7C52,
+ QK_DYNAMIC_MACRO_RECORD_START_1 = 0x7C53,
+ QK_DYNAMIC_MACRO_RECORD_START_2 = 0x7C54,
+ QK_DYNAMIC_MACRO_RECORD_STOP = 0x7C55,
+ QK_DYNAMIC_MACRO_PLAY_1 = 0x7C56,
+ QK_DYNAMIC_MACRO_PLAY_2 = 0x7C57,
+ QK_LEADER = 0x7C58,
+ QK_LOCK = 0x7C59,
+ QK_ONE_SHOT_ON = 0x7C5A,
+ QK_ONE_SHOT_OFF = 0x7C5B,
+ QK_ONE_SHOT_TOGGLE = 0x7C5C,
+ QK_KEY_OVERRIDE_TOGGLE = 0x7C5D,
+ QK_KEY_OVERRIDE_ON = 0x7C5E,
+ QK_KEY_OVERRIDE_OFF = 0x7C5F,
+ QK_SECURE_LOCK = 0x7C60,
+ QK_SECURE_UNLOCK = 0x7C61,
+ QK_SECURE_TOGGLE = 0x7C62,
+ QK_SECURE_REQUEST = 0x7C63,
+ DT_PRNT = 0x7C70,
+ DT_UP = 0x7C71,
+ DT_DOWN = 0x7C72,
+ PRINT_ON = 0x7C73,
+ PRINT_OFF = 0x7C74,
+ QK_CAPS_WORD_TOGGLE = 0x7C75,
+ QK_AUTOCORRECT_ON = 0x7C76,
+ QK_AUTOCORRECT_OFF = 0x7C77,
+ QK_AUTOCORRECT_TOGGLE = 0x7C78,
+ SAFE_RANGE = 0x7E00,
+
+// Alias
+ XXXXXXX = KC_NO,
+ _______ = KC_TRANSPARENT,
+ KC_TRNS = KC_TRANSPARENT,
+ KC_ENT = KC_ENTER,
+ KC_ESC = KC_ESCAPE,
+ KC_BSPC = KC_BACKSPACE,
+ KC_SPC = KC_SPACE,
+ KC_MINS = KC_MINUS,
+ KC_EQL = KC_EQUAL,
+ KC_LBRC = KC_LEFT_BRACKET,
+ KC_RBRC = KC_RIGHT_BRACKET,
+ KC_BSLS = KC_BACKSLASH,
+ KC_NUHS = KC_NONUS_HASH,
+ KC_SCLN = KC_SEMICOLON,
+ KC_QUOT = KC_QUOTE,
+ KC_GRV = KC_GRAVE,
+ KC_COMM = KC_COMMA,
+ KC_SLSH = KC_SLASH,
+ KC_CAPS = KC_CAPS_LOCK,
+ KC_PSCR = KC_PRINT_SCREEN,
+ KC_SCRL = KC_SCROLL_LOCK,
+ KC_BRMD = KC_SCROLL_LOCK,
+ KC_PAUS = KC_PAUSE,
+ KC_BRK = KC_PAUSE,
+ KC_BRMU = KC_PAUSE,
+ KC_INS = KC_INSERT,
+ KC_PGUP = KC_PAGE_UP,
+ KC_DEL = KC_DELETE,
+ KC_PGDN = KC_PAGE_DOWN,
+ KC_RGHT = KC_RIGHT,
+ KC_NUM = KC_NUM_LOCK,
+ KC_PSLS = KC_KP_SLASH,
+ KC_PAST = KC_KP_ASTERISK,
+ KC_PMNS = KC_KP_MINUS,
+ KC_PPLS = KC_KP_PLUS,
+ KC_PENT = KC_KP_ENTER,
+ KC_P1 = KC_KP_1,
+ KC_P2 = KC_KP_2,
+ KC_P3 = KC_KP_3,
+ KC_P4 = KC_KP_4,
+ KC_P5 = KC_KP_5,
+ KC_P6 = KC_KP_6,
+ KC_P7 = KC_KP_7,
+ KC_P8 = KC_KP_8,
+ KC_P9 = KC_KP_9,
+ KC_P0 = KC_KP_0,
+ KC_PDOT = KC_KP_DOT,
+ KC_NUBS = KC_NONUS_BACKSLASH,
+ KC_APP = KC_APPLICATION,
+ KC_PEQL = KC_KP_EQUAL,
+ KC_EXEC = KC_EXECUTE,
+ KC_SLCT = KC_SELECT,
+ KC_AGIN = KC_AGAIN,
+ KC_PSTE = KC_PASTE,
+ KC_LCAP = KC_LOCKING_CAPS_LOCK,
+ KC_LNUM = KC_LOCKING_NUM_LOCK,
+ KC_LSCR = KC_LOCKING_SCROLL_LOCK,
+ KC_PCMM = KC_KP_COMMA,
+ KC_INT1 = KC_INTERNATIONAL_1,
+ KC_INT2 = KC_INTERNATIONAL_2,
+ KC_INT3 = KC_INTERNATIONAL_3,
+ KC_INT4 = KC_INTERNATIONAL_4,
+ KC_INT5 = KC_INTERNATIONAL_5,
+ KC_INT6 = KC_INTERNATIONAL_6,
+ KC_INT7 = KC_INTERNATIONAL_7,
+ KC_INT8 = KC_INTERNATIONAL_8,
+ KC_INT9 = KC_INTERNATIONAL_9,
+ KC_LNG1 = KC_LANGUAGE_1,
+ KC_LNG2 = KC_LANGUAGE_2,
+ KC_LNG3 = KC_LANGUAGE_3,
+ KC_LNG4 = KC_LANGUAGE_4,
+ KC_LNG5 = KC_LANGUAGE_5,
+ KC_LNG6 = KC_LANGUAGE_6,
+ KC_LNG7 = KC_LANGUAGE_7,
+ KC_LNG8 = KC_LANGUAGE_8,
+ KC_LNG9 = KC_LANGUAGE_9,
+ KC_ERAS = KC_ALTERNATE_ERASE,
+ KC_SYRQ = KC_SYSTEM_REQUEST,
+ KC_CNCL = KC_CANCEL,
+ KC_CLR = KC_CLEAR,
+ KC_PRIR = KC_PRIOR,
+ KC_RETN = KC_RETURN,
+ KC_SEPR = KC_SEPARATOR,
+ KC_CLAG = KC_CLEAR_AGAIN,
+ KC_CRSL = KC_CRSEL,
+ KC_EXSL = KC_EXSEL,
+ KC_PWR = KC_SYSTEM_POWER,
+ KC_SLEP = KC_SYSTEM_SLEEP,
+ KC_WAKE = KC_SYSTEM_WAKE,
+ KC_MUTE = KC_AUDIO_MUTE,
+ KC_VOLU = KC_AUDIO_VOL_UP,
+ KC_VOLD = KC_AUDIO_VOL_DOWN,
+ KC_MNXT = KC_MEDIA_NEXT_TRACK,
+ KC_MPRV = KC_MEDIA_PREV_TRACK,
+ KC_MSTP = KC_MEDIA_STOP,
+ KC_MPLY = KC_MEDIA_PLAY_PAUSE,
+ KC_MSEL = KC_MEDIA_SELECT,
+ KC_EJCT = KC_MEDIA_EJECT,
+ KC_CALC = KC_CALCULATOR,
+ KC_MYCM = KC_MY_COMPUTER,
+ KC_WSCH = KC_WWW_SEARCH,
+ KC_WHOM = KC_WWW_HOME,
+ KC_WBAK = KC_WWW_BACK,
+ KC_WFWD = KC_WWW_FORWARD,
+ KC_WSTP = KC_WWW_STOP,
+ KC_WREF = KC_WWW_REFRESH,
+ KC_WFAV = KC_WWW_FAVORITES,
+ KC_MFFD = KC_MEDIA_FAST_FORWARD,
+ KC_MRWD = KC_MEDIA_REWIND,
+ KC_BRIU = KC_BRIGHTNESS_UP,
+ KC_BRID = KC_BRIGHTNESS_DOWN,
+ KC_CPNL = KC_CONTROL_PANEL,
+ KC_ASST = KC_ASSISTANT,
+ KC_MS_U = KC_MS_UP,
+ KC_MS_D = KC_MS_DOWN,
+ KC_MS_L = KC_MS_LEFT,
+ KC_MS_R = KC_MS_RIGHT,
+ KC_BTN1 = KC_MS_BTN1,
+ KC_BTN2 = KC_MS_BTN2,
+ KC_BTN3 = KC_MS_BTN3,
+ KC_BTN4 = KC_MS_BTN4,
+ KC_BTN5 = KC_MS_BTN5,
+ KC_BTN6 = KC_MS_BTN6,
+ KC_BTN7 = KC_MS_BTN7,
+ KC_BTN8 = KC_MS_BTN8,
+ KC_WH_U = KC_MS_WH_UP,
+ KC_WH_D = KC_MS_WH_DOWN,
+ KC_WH_L = KC_MS_WH_LEFT,
+ KC_WH_R = KC_MS_WH_RIGHT,
+ KC_ACL0 = KC_MS_ACCEL0,
+ KC_ACL1 = KC_MS_ACCEL1,
+ KC_ACL2 = KC_MS_ACCEL2,
+ KC_LCTL = KC_LEFT_CTRL,
+ KC_LSFT = KC_LEFT_SHIFT,
+ KC_LALT = KC_LEFT_ALT,
+ KC_LOPT = KC_LEFT_ALT,
+ KC_LGUI = KC_LEFT_GUI,
+ KC_LCMD = KC_LEFT_GUI,
+ KC_LWIN = KC_LEFT_GUI,
+ KC_RCTL = KC_RIGHT_CTRL,
+ KC_RSFT = KC_RIGHT_SHIFT,
+ KC_RALT = KC_RIGHT_ALT,
+ KC_ROPT = KC_RIGHT_ALT,
+ KC_ALGR = KC_RIGHT_ALT,
+ KC_RGUI = KC_RIGHT_GUI,
+ KC_RCMD = KC_RIGHT_GUI,
+ KC_RWIN = KC_RIGHT_GUI,
+ CL_SWAP = MAGIC_SWAP_CONTROL_CAPSLOCK,
+ CL_NORM = MAGIC_UNSWAP_CONTROL_CAPSLOCK,
+ CL_TOGG = MAGIC_TOGGLE_CONTROL_CAPSLOCK,
+ CL_CAPS = MAGIC_UNCAPSLOCK_TO_CONTROL,
+ CL_CTRL = MAGIC_CAPSLOCK_TO_CONTROL,
+ LAG_SWP = MAGIC_SWAP_LALT_LGUI,
+ LAG_NRM = MAGIC_UNSWAP_LALT_LGUI,
+ RAG_SWP = MAGIC_SWAP_RALT_RGUI,
+ RAG_NRM = MAGIC_UNSWAP_RALT_RGUI,
+ GUI_ON = MAGIC_UNNO_GUI,
+ GUI_OFF = MAGIC_NO_GUI,
+ GUI_TOG = MAGIC_TOGGLE_GUI,
+ GE_SWAP = MAGIC_SWAP_GRAVE_ESC,
+ GE_NORM = MAGIC_UNSWAP_GRAVE_ESC,
+ BS_SWAP = MAGIC_SWAP_BACKSLASH_BACKSPACE,
+ BS_NORM = MAGIC_UNSWAP_BACKSLASH_BACKSPACE,
+ BS_TOGG = MAGIC_TOGGLE_BACKSLASH_BACKSPACE,
+ NK_ON = MAGIC_HOST_NKRO,
+ NK_OFF = MAGIC_UNHOST_NKRO,
+ NK_TOGG = MAGIC_TOGGLE_NKRO,
+ AG_SWAP = MAGIC_SWAP_ALT_GUI,
+ AG_NORM = MAGIC_UNSWAP_ALT_GUI,
+ AG_TOGG = MAGIC_TOGGLE_ALT_GUI,
+ LCG_SWP = MAGIC_SWAP_LCTL_LGUI,
+ LCG_NRM = MAGIC_UNSWAP_LCTL_LGUI,
+ RCG_SWP = MAGIC_SWAP_RCTL_RGUI,
+ RCG_NRM = MAGIC_UNSWAP_RCTL_RGUI,
+ CG_SWAP = MAGIC_SWAP_CTL_GUI,
+ CG_NORM = MAGIC_UNSWAP_CTL_GUI,
+ CG_TOGG = MAGIC_TOGGLE_CTL_GUI,
+ EH_LEFT = MAGIC_EE_HANDS_LEFT,
+ EH_RGHT = MAGIC_EE_HANDS_RIGHT,
+ EC_SWAP = MAGIC_SWAP_ESCAPE_CAPSLOCK,
+ EC_NORM = MAGIC_UNSWAP_ESCAPE_CAPSLOCK,
+ EC_TOGG = MAGIC_TOGGLE_ESCAPE_CAPSLOCK,
+ MI_Db = MI_Cs,
+ MI_Eb = MI_Ds,
+ MI_Gb = MI_Fs,
+ MI_Ab = MI_Gs,
+ MI_Bb = MI_As,
+ MI_Db_1 = MI_Cs_1,
+ MI_Eb_1 = MI_Ds_1,
+ MI_Gb_1 = MI_Fs_1,
+ MI_Ab_1 = MI_Gs_1,
+ MI_Bb_1 = MI_As_1,
+ MI_Db_2 = MI_Cs_2,
+ MI_Eb_2 = MI_Ds_2,
+ MI_Gb_2 = MI_Fs_2,
+ MI_Ab_2 = MI_Gs_2,
+ MI_Bb_2 = MI_As_2,
+ MI_Db_3 = MI_Cs_3,
+ MI_Eb_3 = MI_Ds_3,
+ MI_Gb_3 = MI_Fs_3,
+ MI_Ab_3 = MI_Gs_3,
+ MI_Bb_3 = MI_As_3,
+ MI_Db_4 = MI_Cs_4,
+ MI_Eb_4 = MI_Ds_4,
+ MI_Gb_4 = MI_Fs_4,
+ MI_Ab_4 = MI_Gs_4,
+ MI_Bb_4 = MI_As_4,
+ MI_Db_5 = MI_Cs_5,
+ MI_Eb_5 = MI_Ds_5,
+ MI_Gb_5 = MI_Fs_5,
+ MI_Ab_5 = MI_Gs_5,
+ MI_Bb_5 = MI_As_5,
+ JS_0 = QK_JOYSTICK_BUTTON_0,
+ JS_1 = QK_JOYSTICK_BUTTON_1,
+ JS_2 = QK_JOYSTICK_BUTTON_2,
+ JS_3 = QK_JOYSTICK_BUTTON_3,
+ JS_4 = QK_JOYSTICK_BUTTON_4,
+ JS_5 = QK_JOYSTICK_BUTTON_5,
+ JS_6 = QK_JOYSTICK_BUTTON_6,
+ JS_7 = QK_JOYSTICK_BUTTON_7,
+ JS_8 = QK_JOYSTICK_BUTTON_8,
+ JS_9 = QK_JOYSTICK_BUTTON_9,
+ JS_10 = QK_JOYSTICK_BUTTON_10,
+ JS_11 = QK_JOYSTICK_BUTTON_11,
+ JS_12 = QK_JOYSTICK_BUTTON_12,
+ JS_13 = QK_JOYSTICK_BUTTON_13,
+ JS_14 = QK_JOYSTICK_BUTTON_14,
+ JS_15 = QK_JOYSTICK_BUTTON_15,
+ JS_16 = QK_JOYSTICK_BUTTON_16,
+ JS_17 = QK_JOYSTICK_BUTTON_17,
+ JS_18 = QK_JOYSTICK_BUTTON_18,
+ JS_19 = QK_JOYSTICK_BUTTON_19,
+ JS_20 = QK_JOYSTICK_BUTTON_20,
+ JS_21 = QK_JOYSTICK_BUTTON_21,
+ JS_22 = QK_JOYSTICK_BUTTON_22,
+ JS_23 = QK_JOYSTICK_BUTTON_23,
+ JS_24 = QK_JOYSTICK_BUTTON_24,
+ JS_25 = QK_JOYSTICK_BUTTON_25,
+ JS_26 = QK_JOYSTICK_BUTTON_26,
+ JS_27 = QK_JOYSTICK_BUTTON_27,
+ JS_28 = QK_JOYSTICK_BUTTON_28,
+ JS_29 = QK_JOYSTICK_BUTTON_29,
+ JS_30 = QK_JOYSTICK_BUTTON_30,
+ JS_31 = QK_JOYSTICK_BUTTON_31,
+ PB_1 = QK_PROGRAMMABLE_BUTTON_1,
+ PB_2 = QK_PROGRAMMABLE_BUTTON_2,
+ PB_3 = QK_PROGRAMMABLE_BUTTON_3,
+ PB_4 = QK_PROGRAMMABLE_BUTTON_4,
+ PB_5 = QK_PROGRAMMABLE_BUTTON_5,
+ PB_6 = QK_PROGRAMMABLE_BUTTON_6,
+ PB_7 = QK_PROGRAMMABLE_BUTTON_7,
+ PB_8 = QK_PROGRAMMABLE_BUTTON_8,
+ PB_9 = QK_PROGRAMMABLE_BUTTON_9,
+ PB_10 = QK_PROGRAMMABLE_BUTTON_10,
+ PB_11 = QK_PROGRAMMABLE_BUTTON_11,
+ PB_12 = QK_PROGRAMMABLE_BUTTON_12,
+ PB_13 = QK_PROGRAMMABLE_BUTTON_13,
+ PB_14 = QK_PROGRAMMABLE_BUTTON_14,
+ PB_15 = QK_PROGRAMMABLE_BUTTON_15,
+ PB_16 = QK_PROGRAMMABLE_BUTTON_16,
+ PB_17 = QK_PROGRAMMABLE_BUTTON_17,
+ PB_18 = QK_PROGRAMMABLE_BUTTON_18,
+ PB_19 = QK_PROGRAMMABLE_BUTTON_19,
+ PB_20 = QK_PROGRAMMABLE_BUTTON_20,
+ PB_21 = QK_PROGRAMMABLE_BUTTON_21,
+ PB_22 = QK_PROGRAMMABLE_BUTTON_22,
+ PB_23 = QK_PROGRAMMABLE_BUTTON_23,
+ PB_24 = QK_PROGRAMMABLE_BUTTON_24,
+ PB_25 = QK_PROGRAMMABLE_BUTTON_25,
+ PB_26 = QK_PROGRAMMABLE_BUTTON_26,
+ PB_27 = QK_PROGRAMMABLE_BUTTON_27,
+ PB_28 = QK_PROGRAMMABLE_BUTTON_28,
+ PB_29 = QK_PROGRAMMABLE_BUTTON_29,
+ PB_30 = QK_PROGRAMMABLE_BUTTON_30,
+ PB_31 = QK_PROGRAMMABLE_BUTTON_31,
+ PB_32 = QK_PROGRAMMABLE_BUTTON_32,
+ CK_TOGG = CLICKY_TOGGLE,
+ CK_ON = CLICKY_ENABLE,
+ CK_OFF = CLICKY_DISABLE,
+ CK_UP = CLICKY_UP,
+ CK_DOWN = CLICKY_DOWN,
+ CK_RST = CLICKY_RESET,
+ RGB_MOD = RGB_MODE_FORWARD,
+ RGB_RMOD = RGB_MODE_REVERSE,
+ RGB_M_P = RGB_MODE_PLAIN,
+ RGB_M_B = RGB_MODE_BREATHE,
+ RGB_M_R = RGB_MODE_RAINBOW,
+ RGB_M_SW = RGB_MODE_SWIRL,
+ RGB_M_SN = RGB_MODE_SNAKE,
+ RGB_M_K = RGB_MODE_KNIGHT,
+ RGB_M_X = RGB_MODE_XMAS,
+ RGB_M_G = RGB_MODE_GRADIENT,
+ RGB_M_T = RGB_MODE_RGBTEST,
+ RGB_M_TW = RGB_MODE_TWINKLE,
+ QK_BOOT = QK_BOOTLOADER,
+ QK_RBT = QK_REBOOT,
+ DB_TOGG = QK_DEBUG_TOGGLE,
+ EE_CLR = QK_CLEAR_EEPROM,
+ AS_DOWN = QK_AUTO_SHIFT_DOWN,
+ AS_UP = QK_AUTO_SHIFT_UP,
+ AS_RPT = QK_AUTO_SHIFT_REPORT,
+ AS_ON = QK_AUTO_SHIFT_ON,
+ AS_OFF = QK_AUTO_SHIFT_OFF,
+ AS_TOGG = QK_AUTO_SHIFT_TOGGLE,
+ QK_GESC = QK_GRAVE_ESCAPE,
+ VK_TOGG = QK_VELOCIKEY_TOGGLE,
+ SC_LCPO = QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN,
+ SC_RCPC = QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE,
+ SC_LSPO = QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN,
+ SC_RSPC = QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE,
+ SC_LAPO = QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN,
+ SC_RAPC = QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE,
+ SC_SENT = QK_SPACE_CADET_RIGHT_SHIFT_ENTER,
+ UC_NEXT = QK_UNICODE_MODE_NEXT,
+ UC_PREV = QK_UNICODE_MODE_PREVIOUS,
+ UC_MAC = QK_UNICODE_MODE_MACOS,
+ UC_LINX = QK_UNICODE_MODE_LINUX,
+ UC_WIN = QK_UNICODE_MODE_WINDOWS,
+ UC_BSD = QK_UNICODE_MODE_BSD,
+ UC_WINC = QK_UNICODE_MODE_WINCOMPOSE,
+ UC_EMAC = QK_UNICODE_MODE_EMACS,
+ CM_ON = QK_COMBO_ON,
+ CM_OFF = QK_COMBO_OFF,
+ CM_TOGG = QK_COMBO_TOGGLE,
+ DM_REC1 = QK_DYNAMIC_MACRO_RECORD_START_1,
+ DM_REC2 = QK_DYNAMIC_MACRO_RECORD_START_2,
+ DM_RSTP = QK_DYNAMIC_MACRO_RECORD_STOP,
+ DM_PLY1 = QK_DYNAMIC_MACRO_PLAY_1,
+ DM_PLY2 = QK_DYNAMIC_MACRO_PLAY_2,
+ QK_LEAD = QK_LEADER,
+ OS_ON = QK_ONE_SHOT_ON,
+ OS_OFF = QK_ONE_SHOT_OFF,
+ OS_TOGG = QK_ONE_SHOT_TOGGLE,
+ KO_TOGG = QK_KEY_OVERRIDE_TOGGLE,
+ KO_ON = QK_KEY_OVERRIDE_ON,
+ KO_OFF = QK_KEY_OVERRIDE_OFF,
+ SE_LOCK = QK_SECURE_LOCK,
+ SE_UNLK = QK_SECURE_UNLOCK,
+ SE_TOGG = QK_SECURE_TOGGLE,
+ SE_REQ = QK_SECURE_REQUEST,
+ CW_TOGG = QK_CAPS_WORD_TOGGLE,
+ AC_ON = QK_AUTOCORRECT_ON,
+ AC_OFF = QK_AUTOCORRECT_OFF,
+ AC_TOGG = QK_AUTOCORRECT_TOGGLE,
+};
+
+// Range Helpers
+#define IS_QK_BASIC(code) ((code) >= QK_BASIC && (code) <= QK_BASIC_MAX)
+#define IS_QK_MODS(code) ((code) >= QK_MODS && (code) <= QK_MODS_MAX)
+#define IS_QK_MOD_TAP(code) ((code) >= QK_MOD_TAP && (code) <= QK_MOD_TAP_MAX)
+#define IS_QK_LAYER_TAP(code) ((code) >= QK_LAYER_TAP && (code) <= QK_LAYER_TAP_MAX)
+#define IS_QK_LAYER_MOD(code) ((code) >= QK_LAYER_MOD && (code) <= QK_LAYER_MOD_MAX)
+#define IS_QK_TO(code) ((code) >= QK_TO && (code) <= QK_TO_MAX)
+#define IS_QK_MOMENTARY(code) ((code) >= QK_MOMENTARY && (code) <= QK_MOMENTARY_MAX)
+#define IS_QK_DEF_LAYER(code) ((code) >= QK_DEF_LAYER && (code) <= QK_DEF_LAYER_MAX)
+#define IS_QK_TOGGLE_LAYER(code) ((code) >= QK_TOGGLE_LAYER && (code) <= QK_TOGGLE_LAYER_MAX)
+#define IS_QK_ONE_SHOT_LAYER(code) ((code) >= QK_ONE_SHOT_LAYER && (code) <= QK_ONE_SHOT_LAYER_MAX)
+#define IS_QK_ONE_SHOT_MOD(code) ((code) >= QK_ONE_SHOT_MOD && (code) <= QK_ONE_SHOT_MOD_MAX)
+#define IS_QK_LAYER_TAP_TOGGLE(code) ((code) >= QK_LAYER_TAP_TOGGLE && (code) <= QK_LAYER_TAP_TOGGLE_MAX)
+#define IS_QK_SWAP_HANDS(code) ((code) >= QK_SWAP_HANDS && (code) <= QK_SWAP_HANDS_MAX)
+#define IS_QK_TAP_DANCE(code) ((code) >= QK_TAP_DANCE && (code) <= QK_TAP_DANCE_MAX)
+#define IS_QK_MAGIC(code) ((code) >= QK_MAGIC && (code) <= QK_MAGIC_MAX)
+#define IS_QK_MIDI(code) ((code) >= QK_MIDI && (code) <= QK_MIDI_MAX)
+#define IS_QK_SEQUENCER(code) ((code) >= QK_SEQUENCER && (code) <= QK_SEQUENCER_MAX)
+#define IS_QK_JOYSTICK(code) ((code) >= QK_JOYSTICK && (code) <= QK_JOYSTICK_MAX)
+#define IS_QK_PROGRAMMABLE_BUTTON(code) ((code) >= QK_PROGRAMMABLE_BUTTON && (code) <= QK_PROGRAMMABLE_BUTTON_MAX)
+#define IS_QK_AUDIO(code) ((code) >= QK_AUDIO && (code) <= QK_AUDIO_MAX)
+#define IS_QK_STENO(code) ((code) >= QK_STENO && (code) <= QK_STENO_MAX)
+#define IS_QK_MACRO(code) ((code) >= QK_MACRO && (code) <= QK_MACRO_MAX)
+#define IS_QK_LIGHTING(code) ((code) >= QK_LIGHTING && (code) <= QK_LIGHTING_MAX)
+#define IS_QK_QUANTUM(code) ((code) >= QK_QUANTUM && (code) <= QK_QUANTUM_MAX)
+#define IS_QK_KB(code) ((code) >= QK_KB && (code) <= QK_KB_MAX)
+#define IS_QK_USER(code) ((code) >= QK_USER && (code) <= QK_USER_MAX)
+#define IS_QK_UNICODE(code) ((code) >= QK_UNICODE && (code) <= QK_UNICODE_MAX)
+
+// Group Helpers
+#define IS_INTERNAL_KEYCODE(code) ((code) >= KC_NO && (code) <= KC_TRANSPARENT)
+#define IS_BASIC_KEYCODE(code) ((code) >= KC_A && (code) <= KC_EXSEL)
+#define IS_SYSTEM_KEYCODE(code) ((code) >= KC_SYSTEM_POWER && (code) <= KC_SYSTEM_WAKE)
+#define IS_MEDIA_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_ASSISTANT)
+#define IS_MOUSE_KEYCODE(code) ((code) >= KC_MS_UP && (code) <= KC_MS_ACCEL2)
+#define IS_MODIFIERS_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI)
+#define IS_SWAP_HANDS_KEYCODE(code) ((code) >= SH_TG && (code) <= SH_OS)
+#define IS_MAGIC_KEYCODE(code) ((code) >= MAGIC_SWAP_CONTROL_CAPSLOCK && (code) <= MAGIC_TOGGLE_ESCAPE_CAPSLOCK)
+#define IS_MIDI_KEYCODE(code) ((code) >= MI_ON && (code) <= MI_BENDU)
+#define IS_SEQUENCER_KEYCODE(code) ((code) >= SQ_ON && (code) <= SQ_SCLR)
+#define IS_JOYSTICK_KEYCODE(code) ((code) >= QK_JOYSTICK_BUTTON_0 && (code) <= QK_JOYSTICK_BUTTON_31)
+#define IS_PROGRAMMABLE_BUTTON_KEYCODE(code) ((code) >= QK_PROGRAMMABLE_BUTTON_1 && (code) <= QK_PROGRAMMABLE_BUTTON_32)
+#define IS_AUDIO_KEYCODE(code) ((code) >= AU_ON && (code) <= MUV_DE)
+#define IS_STENO_KEYCODE(code) ((code) >= QK_STENO_BOLT && (code) <= QK_STENO_COMB_MAX)
+#define IS_MACRO_KEYCODE(code) ((code) >= MACRO_0 && (code) <= MACRO_31)
+#define IS_BACKLIGHT_KEYCODE(code) ((code) >= BL_ON && (code) <= BL_BRTG)
+#define IS_RGB_KEYCODE(code) ((code) >= RGB_TOG && (code) <= RGB_MODE_TWINKLE)
+#define IS_QUANTUM_KEYCODE(code) ((code) >= QK_BOOTLOADER && (code) <= QK_AUTOCORRECT_TOGGLE)
+
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index 50e581cd87..a5997711f2 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -109,7 +109,7 @@ action_t action_for_keycode(uint16_t keycode) {
break;
case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX:;
// OSM(mod) - One-shot mod
- mod = mod_config(keycode & 0xFF);
+ mod = mod_config(keycode & 0x1F);
action.code = ACTION_MODS_ONESHOT(mod);
break;
#endif
@@ -118,8 +118,8 @@ action_t action_for_keycode(uint16_t keycode) {
action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF);
break;
case QK_LAYER_MOD ... QK_LAYER_MOD_MAX:
- mod = mod_config(keycode & 0xF);
- action_layer = (keycode >> 4) & 0xF;
+ mod = mod_config(keycode & 0x1F);
+ action_layer = (keycode >> 5) & 0xF;
action.code = ACTION_LAYER_MODS(action_layer, mod);
break;
#endif
diff --git a/quantum/process_keycode/process_joystick.c b/quantum/process_keycode/process_joystick.c
index c4c6fb59a8..43067b81db 100644
--- a/quantum/process_keycode/process_joystick.c
+++ b/quantum/process_keycode/process_joystick.c
@@ -19,11 +19,11 @@
bool process_joystick(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
- case QK_JOYSTICK_BUTTON_MIN ... QK_JOYSTICK_BUTTON_MAX:
+ case QK_JOYSTICK ... QK_JOYSTICK_MAX:
if (record->event.pressed) {
- register_joystick_button(keycode - QK_JOYSTICK_BUTTON_MIN);
+ register_joystick_button(keycode - QK_JOYSTICK);
} else {
- unregister_joystick_button(keycode - QK_JOYSTICK_BUTTON_MIN);
+ unregister_joystick_button(keycode - QK_JOYSTICK);
}
return false;
}
diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c
index 50816c5261..72332b20d7 100644
--- a/quantum/process_keycode/process_magic.c
+++ b/quantum/process_keycode/process_magic.c
@@ -40,158 +40,152 @@ float cg_swap_song[][2] = CG_SWAP_SONG;
bool process_magic(uint16_t keycode, keyrecord_t *record) {
// skip anything that isn't a keyup
if (record->event.pressed) {
- switch (keycode) {
- case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_ALT_GUI:
- case MAGIC_SWAP_LCTL_LGUI ... MAGIC_EE_HANDS_RIGHT:
- case MAGIC_TOGGLE_GUI:
- case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
- case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
- case MAGIC_SWAP_ESCAPE_CAPSLOCK ... MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
- /* keymap config */
- keymap_config.raw = eeconfig_read_keymap();
- switch (keycode) {
- case MAGIC_SWAP_CONTROL_CAPSLOCK:
- keymap_config.swap_control_capslock = true;
- break;
- case MAGIC_SWAP_ESCAPE_CAPSLOCK:
- keymap_config.swap_escape_capslock = true;
- break;
- case MAGIC_CAPSLOCK_TO_CONTROL:
- keymap_config.capslock_to_control = true;
- break;
- case MAGIC_SWAP_LALT_LGUI:
- keymap_config.swap_lalt_lgui = true;
- break;
- case MAGIC_SWAP_RALT_RGUI:
- keymap_config.swap_ralt_rgui = true;
- break;
- case MAGIC_SWAP_LCTL_LGUI:
- keymap_config.swap_lctl_lgui = true;
- break;
- case MAGIC_SWAP_RCTL_RGUI:
- keymap_config.swap_rctl_rgui = true;
- break;
- case MAGIC_NO_GUI:
- keymap_config.no_gui = true;
- break;
- case MAGIC_SWAP_GRAVE_ESC:
- keymap_config.swap_grave_esc = true;
- break;
- case MAGIC_SWAP_BACKSLASH_BACKSPACE:
- keymap_config.swap_backslash_backspace = true;
- break;
- case MAGIC_HOST_NKRO:
- clear_keyboard(); // clear first buffer to prevent stuck keys
- keymap_config.nkro = true;
- break;
- case MAGIC_SWAP_ALT_GUI:
- keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true;
+ if (IS_MAGIC_KEYCODE(keycode)) {
+ /* keymap config */
+ keymap_config.raw = eeconfig_read_keymap();
+ switch (keycode) {
+ case MAGIC_SWAP_CONTROL_CAPSLOCK:
+ keymap_config.swap_control_capslock = true;
+ break;
+ case MAGIC_SWAP_ESCAPE_CAPSLOCK:
+ keymap_config.swap_escape_capslock = true;
+ break;
+ case MAGIC_CAPSLOCK_TO_CONTROL:
+ keymap_config.capslock_to_control = true;
+ break;
+ case MAGIC_SWAP_LALT_LGUI:
+ keymap_config.swap_lalt_lgui = true;
+ break;
+ case MAGIC_SWAP_RALT_RGUI:
+ keymap_config.swap_ralt_rgui = true;
+ break;
+ case MAGIC_SWAP_LCTL_LGUI:
+ keymap_config.swap_lctl_lgui = true;
+ break;
+ case MAGIC_SWAP_RCTL_RGUI:
+ keymap_config.swap_rctl_rgui = true;
+ break;
+ case MAGIC_NO_GUI:
+ keymap_config.no_gui = true;
+ break;
+ case MAGIC_SWAP_GRAVE_ESC:
+ keymap_config.swap_grave_esc = true;
+ break;
+ case MAGIC_SWAP_BACKSLASH_BACKSPACE:
+ keymap_config.swap_backslash_backspace = true;
+ break;
+ case MAGIC_HOST_NKRO:
+ clear_keyboard(); // clear first buffer to prevent stuck keys
+ keymap_config.nkro = true;
+ break;
+ case MAGIC_SWAP_ALT_GUI:
+ keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true;
#ifdef AUDIO_ENABLE
- PLAY_SONG(ag_swap_song);
+ PLAY_SONG(ag_swap_song);
#endif
- break;
- case MAGIC_SWAP_CTL_GUI:
- keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = true;
+ break;
+ case MAGIC_SWAP_CTL_GUI:
+ keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = true;
#ifdef AUDIO_ENABLE
- PLAY_SONG(cg_swap_song);
+ PLAY_SONG(cg_swap_song);
#endif
- break;
- case MAGIC_UNSWAP_CONTROL_CAPSLOCK:
- keymap_config.swap_control_capslock = false;
- break;
- case MAGIC_UNSWAP_ESCAPE_CAPSLOCK:
- keymap_config.swap_escape_capslock = false;
- break;
- case MAGIC_UNCAPSLOCK_TO_CONTROL:
- keymap_config.capslock_to_control = false;
- break;
- case MAGIC_UNSWAP_LALT_LGUI:
- keymap_config.swap_lalt_lgui = false;
- break;
- case MAGIC_UNSWAP_RALT_RGUI:
- keymap_config.swap_ralt_rgui = false;
- break;
- case MAGIC_UNSWAP_LCTL_LGUI:
- keymap_config.swap_lctl_lgui = false;
- break;
- case MAGIC_UNSWAP_RCTL_RGUI:
- keymap_config.swap_rctl_rgui = false;
- break;
- case MAGIC_UNNO_GUI:
- keymap_config.no_gui = false;
- break;
- case MAGIC_UNSWAP_GRAVE_ESC:
- keymap_config.swap_grave_esc = false;
- break;
- case MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
- keymap_config.swap_backslash_backspace = false;
- break;
- case MAGIC_UNHOST_NKRO:
- clear_keyboard(); // clear first buffer to prevent stuck keys
- keymap_config.nkro = false;
- break;
- case MAGIC_UNSWAP_ALT_GUI:
- keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false;
+ break;
+ case MAGIC_UNSWAP_CONTROL_CAPSLOCK:
+ keymap_config.swap_control_capslock = false;
+ break;
+ case MAGIC_UNSWAP_ESCAPE_CAPSLOCK:
+ keymap_config.swap_escape_capslock = false;
+ break;
+ case MAGIC_UNCAPSLOCK_TO_CONTROL:
+ keymap_config.capslock_to_control = false;
+ break;
+ case MAGIC_UNSWAP_LALT_LGUI:
+ keymap_config.swap_lalt_lgui = false;
+ break;
+ case MAGIC_UNSWAP_RALT_RGUI:
+ keymap_config.swap_ralt_rgui = false;
+ break;
+ case MAGIC_UNSWAP_LCTL_LGUI:
+ keymap_config.swap_lctl_lgui = false;
+ break;
+ case MAGIC_UNSWAP_RCTL_RGUI:
+ keymap_config.swap_rctl_rgui = false;
+ break;
+ case MAGIC_UNNO_GUI:
+ keymap_config.no_gui = false;
+ break;
+ case MAGIC_UNSWAP_GRAVE_ESC:
+ keymap_config.swap_grave_esc = false;
+ break;
+ case MAGIC_UNSWAP_BACKSLASH_BACKSPACE:
+ keymap_config.swap_backslash_backspace = false;
+ break;
+ case MAGIC_UNHOST_NKRO:
+ clear_keyboard(); // clear first buffer to prevent stuck keys
+ keymap_config.nkro = false;
+ break;
+ case MAGIC_UNSWAP_ALT_GUI:
+ keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false;
#ifdef AUDIO_ENABLE
- PLAY_SONG(ag_norm_song);
+ PLAY_SONG(ag_norm_song);
#endif
- break;
- case MAGIC_UNSWAP_CTL_GUI:
- keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = false;
+ break;
+ case MAGIC_UNSWAP_CTL_GUI:
+ keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = false;
#ifdef AUDIO_ENABLE
- PLAY_SONG(cg_norm_song);
+ PLAY_SONG(cg_norm_song);
#endif
- break;
- case MAGIC_TOGGLE_ALT_GUI:
- keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui;
- keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui;
+ break;
+ case MAGIC_TOGGLE_ALT_GUI:
+ keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui;
+ keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui;
#ifdef AUDIO_ENABLE
- if (keymap_config.swap_ralt_rgui) {
- PLAY_SONG(ag_swap_song);
- } else {
- PLAY_SONG(ag_norm_song);
- }
+ if (keymap_config.swap_ralt_rgui) {
+ PLAY_SONG(ag_swap_song);
+ } else {
+ PLAY_SONG(ag_norm_song);
+ }
#endif
- break;
- case MAGIC_TOGGLE_CTL_GUI:
- keymap_config.swap_lctl_lgui = !keymap_config.swap_lctl_lgui;
- keymap_config.swap_rctl_rgui = keymap_config.swap_lctl_lgui;
+ break;
+ case MAGIC_TOGGLE_CTL_GUI:
+ keymap_config.swap_lctl_lgui = !keymap_config.swap_lctl_lgui;
+ keymap_config.swap_rctl_rgui = keymap_config.swap_lctl_lgui;
#ifdef AUDIO_ENABLE
- if (keymap_config.swap_rctl_rgui) {
- PLAY_SONG(cg_swap_song);
- } else {
- PLAY_SONG(cg_norm_song);
- }
+ if (keymap_config.swap_rctl_rgui) {
+ PLAY_SONG(cg_swap_song);
+ } else {
+ PLAY_SONG(cg_norm_song);
+ }
#endif
- break;
- case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
- keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
- break;
- case MAGIC_TOGGLE_NKRO:
- clear_keyboard(); // clear first buffer to prevent stuck keys
- keymap_config.nkro = !keymap_config.nkro;
- break;
- case MAGIC_EE_HANDS_LEFT:
- eeconfig_update_handedness(true);
- break;
- case MAGIC_EE_HANDS_RIGHT:
- eeconfig_update_handedness(false);
- break;
- case MAGIC_TOGGLE_GUI:
- keymap_config.no_gui = !keymap_config.no_gui;
- break;
- case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
- keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
- break;
- case MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
- keymap_config.swap_escape_capslock = !keymap_config.swap_escape_capslock;
- break;
- }
+ break;
+ case MAGIC_TOGGLE_BACKSLASH_BACKSPACE:
+ keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
+ break;
+ case MAGIC_TOGGLE_NKRO:
+ clear_keyboard(); // clear first buffer to prevent stuck keys
+ keymap_config.nkro = !keymap_config.nkro;
+ break;
+ case MAGIC_EE_HANDS_LEFT:
+ eeconfig_update_handedness(true);
+ break;
+ case MAGIC_EE_HANDS_RIGHT:
+ eeconfig_update_handedness(false);
+ break;
+ case MAGIC_TOGGLE_GUI:
+ keymap_config.no_gui = !keymap_config.no_gui;
+ break;
+ case MAGIC_TOGGLE_CONTROL_CAPSLOCK:
+ keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
+ break;
+ case MAGIC_TOGGLE_ESCAPE_CAPSLOCK:
+ keymap_config.swap_escape_capslock = !keymap_config.swap_escape_capslock;
+ break;
+ }
- eeconfig_update_keymap(keymap_config.raw);
- clear_keyboard(); // clear to prevent stuck keys
+ eeconfig_update_keymap(keymap_config.raw);
+ clear_keyboard(); // clear to prevent stuck keys
- return false;
+ return false;
}
}
diff --git a/quantum/process_keycode/process_programmable_button.c b/quantum/process_keycode/process_programmable_button.c
index d6a14e120c..03034edb61 100644
--- a/quantum/process_keycode/process_programmable_button.c
+++ b/quantum/process_keycode/process_programmable_button.c
@@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "programmable_button.h"
bool process_programmable_button(uint16_t keycode, keyrecord_t *record) {
- if (keycode >= QK_PROGRAMMABLE_BUTTON_MIN && keycode <= QK_PROGRAMMABLE_BUTTON_MAX) {
- uint8_t button = keycode - QK_PROGRAMMABLE_BUTTON_MIN + 1;
+ if (IS_QK_PROGRAMMABLE_BUTTON(keycode)) {
+ uint8_t button = keycode - QK_PROGRAMMABLE_BUTTON + 1;
if (record->event.pressed) {
programmable_button_register(button);
} else {
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 2df733fe1f..ec69fadbab 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -16,610 +16,28 @@
#pragma once
-#include "sequencer.h"
-
-// Fillers to make layering more clear
-#define _______ KC_TRANSPARENT
-#define XXXXXXX KC_NO
-
-enum quantum_keycodes {
- // Ranges used in shortcuts - not to be used directly
- QK_BASIC = 0x0000,
- QK_BASIC_MAX = 0x00FF,
- QK_MODS = 0x0100,
- QK_LCTL = 0x0100,
- QK_LSFT = 0x0200,
- QK_LALT = 0x0400,
- QK_LGUI = 0x0800,
- QK_RMODS_MIN = 0x1000,
- QK_RCTL = 0x1100,
- QK_RSFT = 0x1200,
- QK_RALT = 0x1400,
- QK_RGUI = 0x1800,
- QK_MODS_MAX = 0x1FFF,
- QK_LAYER_TAP = 0x4000,
- QK_LAYER_TAP_MAX = 0x4FFF,
- QK_TO = 0x5000,
- QK_TO_MAX = 0x50FF,
- QK_MOMENTARY = 0x5100,
- QK_MOMENTARY_MAX = 0x51FF,
- QK_DEF_LAYER = 0x5200,
- QK_DEF_LAYER_MAX = 0x52FF,
- QK_TOGGLE_LAYER = 0x5300,
- QK_TOGGLE_LAYER_MAX = 0x53FF,
- QK_ONE_SHOT_LAYER = 0x5400,
- QK_ONE_SHOT_LAYER_MAX = 0x54FF,
- QK_ONE_SHOT_MOD = 0x5500,
- QK_ONE_SHOT_MOD_MAX = 0x55FF,
- QK_SWAP_HANDS = 0x5600,
- QK_SWAP_HANDS_MAX = 0x56FF,
- QK_TAP_DANCE = 0x5700,
- QK_TAP_DANCE_MAX = 0x57FF,
- QK_LAYER_TAP_TOGGLE = 0x5800,
- QK_LAYER_TAP_TOGGLE_MAX = 0x58FF,
- QK_LAYER_MOD = 0x5900,
- QK_LAYER_MOD_MAX = 0x59FF,
- QK_STENO = 0x5A00,
- QK_STENO_BOLT = 0x5A30,
- QK_STENO_GEMINI = 0x5A31,
- QK_STENO_COMB = 0x5A32,
- QK_STENO_COMB_MAX = 0x5A3C,
- QK_STENO_MAX = 0x5A3F,
- // 0x5C00 - 0x5FFF are reserved, see below
- QK_MOD_TAP = 0x6000,
- QK_MOD_TAP_MAX = 0x7FFF,
- QK_UNICODE = 0x8000,
- QK_UNICODE_MAX = 0xFFFF,
- QK_UNICODEMAP = 0x8000,
- QK_UNICODEMAP_MAX = 0xBFFF,
- QK_UNICODEMAP_PAIR = 0xC000,
- QK_UNICODEMAP_PAIR_MAX = 0xFFFF,
-
- // Loose keycodes - to be used directly
- QK_BOOTLOADER = 0x5C00,
- QK_DEBUG_TOGGLE, // 5C01
-
- // Magic
- MAGIC_SWAP_CONTROL_CAPSLOCK, // 5C02
- MAGIC_CAPSLOCK_TO_CONTROL, // 5C03
- MAGIC_SWAP_LALT_LGUI, // 5C04
- MAGIC_SWAP_RALT_RGUI, // 5C05
- MAGIC_NO_GUI, // 5C06
- MAGIC_SWAP_GRAVE_ESC, // 5C07
- MAGIC_SWAP_BACKSLASH_BACKSPACE, // 5C08
- MAGIC_HOST_NKRO, // 5C09
- MAGIC_SWAP_ALT_GUI, // 5C0A
- MAGIC_UNSWAP_CONTROL_CAPSLOCK, // 5C0B
- MAGIC_UNCAPSLOCK_TO_CONTROL, // 5C0C
- MAGIC_UNSWAP_LALT_LGUI, // 5C0D
- MAGIC_UNSWAP_RALT_RGUI, // 5C0E
- MAGIC_UNNO_GUI, // 5C0F
- MAGIC_UNSWAP_GRAVE_ESC, // 5C10
- MAGIC_UNSWAP_BACKSLASH_BACKSPACE, // 5C11
- MAGIC_UNHOST_NKRO, // 5C12
- MAGIC_UNSWAP_ALT_GUI, // 5C13
- MAGIC_TOGGLE_NKRO, // 5C14
- MAGIC_TOGGLE_ALT_GUI, // 5C15
-
- // Grave Escape
- QK_GRAVE_ESCAPE, // 5C16
-
- // Auto Shift
- QK_AUTO_SHIFT_UP, // 5C17
- QK_AUTO_SHIFT_DOWN, // 5C18
- QK_AUTO_SHIFT_REPORT, // 5C19
- QK_AUTO_SHIFT_TOGGLE, // 5C1A
- QK_AUTO_SHIFT_ON, // 5C1B
- QK_AUTO_SHIFT_OFF, // 5C1C
-
- // Audio
- AU_ON, // 5C1D
- AU_OFF, // 5C1E
- AU_TOG, // 5C1F
-
- // Audio Clicky
- CLICKY_TOGGLE, // 5C20
- CLICKY_ENABLE, // 5C21
- CLICKY_DISABLE, // 5C22
- CLICKY_UP, // 5C23
- CLICKY_DOWN, // 5C24
- CLICKY_RESET, // 5C25
-
- // Music mode
- MU_ON, // 5C26
- MU_OFF, // 5C27
- MU_TOG, // 5C28
- MU_MOD, // 5C29
- MUV_IN, // 5C2A
- MUV_DE, // 5C2B
-
- // MIDI
- MI_ON, // 5C2C
- MI_OFF, // 5C2D
- MI_TOG, // 5C2E
-
- MI_C, // 5C2F
- MI_Cs, // 5C30
- MI_Db = MI_Cs,
- MI_D, // 5C31
- MI_Ds, // 5C32
- MI_Eb = MI_Ds,
- MI_E, // 5C33
- MI_F, // 5C34
- MI_Fs, // 5C35
- MI_Gb = MI_Fs,
- MI_G, // 5C36
- MI_Gs, // 5C37
- MI_Ab = MI_Gs,
- MI_A, // 5C38
- MI_As, // 5C39
- MI_Bb = MI_As,
- MI_B, // 5C3A
-
- MI_C_1, // 5C3B
- MI_Cs_1, // 5C3C
- MI_Db_1 = MI_Cs_1,
- MI_D_1, // 5C3D
- MI_Ds_1, // 5C3E
- MI_Eb_1 = MI_Ds_1,
- MI_E_1, // 5C3F
- MI_F_1, // 5C40
- MI_Fs_1, // 5C41
- MI_Gb_1 = MI_Fs_1,
- MI_G_1, // 5C42
- MI_Gs_1, // 5C43
- MI_Ab_1 = MI_Gs_1,
- MI_A_1, // 5C44
- MI_As_1, // 5C45
- MI_Bb_1 = MI_As_1,
- MI_B_1, // 5C46
-
- MI_C_2, // 5C47
- MI_Cs_2, // 5C48
- MI_Db_2 = MI_Cs_2,
- MI_D_2, // 5C49
- MI_Ds_2, // 5C4A
- MI_Eb_2 = MI_Ds_2,
- MI_E_2, // 5C4B
- MI_F_2, // 5C4C
- MI_Fs_2, // 5C4D
- MI_Gb_2 = MI_Fs_2,
- MI_G_2, // 5C4E
- MI_Gs_2, // 5C4F
- MI_Ab_2 = MI_Gs_2,
- MI_A_2, // 5C50
- MI_As_2, // 5C51
- MI_Bb_2 = MI_As_2,
- MI_B_2, // 5C52
-
- MI_C_3, // 5C53
- MI_Cs_3, // 5C54
- MI_Db_3 = MI_Cs_3,
- MI_D_3, // 5C55
- MI_Ds_3, // 5C56
- MI_Eb_3 = MI_Ds_3,
- MI_E_3, // 5C57
- MI_F_3, // 5C58
- MI_Fs_3, // 5C59
- MI_Gb_3 = MI_Fs_3,
- MI_G_3, // 5C5A
- MI_Gs_3, // 5C5B
- MI_Ab_3 = MI_Gs_3,
- MI_A_3, // 5C5C
- MI_As_3, // 5C5D
- MI_Bb_3 = MI_As_3,
- MI_B_3, // 5C5E
-
- MI_C_4, // 5C5F
- MI_Cs_4, // 5C60
- MI_Db_4 = MI_Cs_4,
- MI_D_4, // 5C61
- MI_Ds_4, // 5C62
- MI_Eb_4 = MI_Ds_4,
- MI_E_4, // 5C63
- MI_F_4, // 5C64
- MI_Fs_4, // 5C65
- MI_Gb_4 = MI_Fs_4,
- MI_G_4, // 5C66
- MI_Gs_4, // 5C67
- MI_Ab_4 = MI_Gs_4,
- MI_A_4, // 5C68
- MI_As_4, // 5C69
- MI_Bb_4 = MI_As_4,
- MI_B_4, // 5C6A
-
- MI_C_5, // 5C6B
- MI_Cs_5, // 5C6C
- MI_Db_5 = MI_Cs_5,
- MI_D_5, // 5C6D
- MI_Ds_5, // 5C6E
- MI_Eb_5 = MI_Ds_5,
- MI_E_5, // 5C6F
- MI_F_5, // 5C70
- MI_Fs_5, // 5C71
- MI_Gb_5 = MI_Fs_5,
- MI_G_5, // 5C72
- MI_Gs_5, // 5C73
- MI_Ab_5 = MI_Gs_5,
- MI_A_5, // 5C74
- MI_As_5, // 5C75
- MI_Bb_5 = MI_As_5,
- MI_B_5, // 5C76
-
- MI_OCT_N2, // 5C77
- MI_OCT_N1, // 5C78
- MI_OCT_0, // 5C79
- MI_OCT_1, // 5C7A
- MI_OCT_2, // 5C7B
- MI_OCT_3, // 5C7C
- MI_OCT_4, // 5C7D
- MI_OCT_5, // 5C7E
- MI_OCT_6, // 5C7F
- MI_OCT_7, // 5C80
- MI_OCTD, // 5C81
- MI_OCTU, // 5C82
-
- MI_TRNS_N6, // 5C83
- MI_TRNS_N5, // 5C84
- MI_TRNS_N4, // 5C85
- MI_TRNS_N3, // 5C86
- MI_TRNS_N2, // 5C87
- MI_TRNS_N1, // 5C88
- MI_TRNS_0, // 5C89
- MI_TRNS_1, // 5C8A
- MI_TRNS_2, // 5C8B
- MI_TRNS_3, // 5C8C
- MI_TRNS_4, // 5C8D
- MI_TRNS_5, // 5C8E
- MI_TRNS_6, // 5C8F
- MI_TRNSD, // 5C90
- MI_TRNSU, // 5C91
-
- MI_VEL_0, // 5C92
-#ifdef VIA_ENABLE
- MI_VEL_1 = MI_VEL_0,
-#else
- MI_VEL_1, // 5C93
-#endif
- MI_VEL_2, // 5C94
- MI_VEL_3, // 5C95
- MI_VEL_4, // 5C96
- MI_VEL_5, // 5C97
- MI_VEL_6, // 5C98
- MI_VEL_7, // 5C99
- MI_VEL_8, // 5C9A
- MI_VEL_9, // 5C9B
- MI_VEL_10, // 5C9C
- MI_VELD, // 5C9D
- MI_VELU, // 5C9E
-
- MI_CH1, // 5C9F
- MI_CH2, // 5CA0
- MI_CH3, // 5CA1
- MI_CH4, // 5CA2
- MI_CH5, // 5CA3
- MI_CH6, // 5CA4
- MI_CH7, // 5CA5
- MI_CH8, // 5CA6
- MI_CH9, // 5CA7
- MI_CH10, // 5CA8
- MI_CH11, // 5CA9
- MI_CH12, // 5CAA
- MI_CH13, // 5CAB
- MI_CH14, // 5CAC
- MI_CH15, // 5CAD
- MI_CH16, // 5CAE
- MI_CHD, // 5CAF
- MI_CHU, // 5CB0
-
- MI_ALLOFF, // 5CB1
-
- MI_SUS, // 5CB2
- MI_PORT, // 5CB3
- MI_SOST, // 5CB4
- MI_SOFT, // 5CB5
- MI_LEG, // 5CB6
-
- MI_MOD, // 5CB7
- MI_MODSD, // 5CB8
- MI_MODSU, // 5CB9
-
- MI_BENDD, // 5CBA
- MI_BENDU, // 5CBB
-
- // Backlight
- BL_ON, // 5CBC
- BL_OFF, // 5CBD
- BL_DEC, // 5CBE
- BL_INC, // 5CBF
- BL_TOGG, // 5CC0
- BL_STEP, // 5CC1
- BL_BRTG, // 5CC2
-
- // RGB underglow/matrix
- RGB_TOG, // 5CC3
- RGB_MODE_FORWARD, // 5CC4
- RGB_MODE_REVERSE, // 5CC5
- RGB_HUI, // 5CC6
- RGB_HUD, // 5CC7
- RGB_SAI, // 5CC8
- RGB_SAD, // 5CC9
- RGB_VAI, // 5CCA
- RGB_VAD, // 5CCB
- RGB_SPI, // 5CCC
- RGB_SPD, // 5CCD
- RGB_MODE_PLAIN, // 5CCE
- RGB_MODE_BREATHE, // 5CCF
- RGB_MODE_RAINBOW, // 5CD0
- RGB_MODE_SWIRL, // 5CD1
- RGB_MODE_SNAKE, // 5CD2
- RGB_MODE_KNIGHT, // 5CD3
- RGB_MODE_XMAS, // 5CD4
- RGB_MODE_GRADIENT, // 5CD5
- RGB_MODE_RGBTEST, // 5CD6
-
- // Velocikey
- QK_VELOCIKEY_TOGGLE, // 5CD7
-
- // Space Cadet
- QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN, // 5CD8
- QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE, // 5CD9
- QK_SPACE_CADET_RIGHT_SHIFT_ENTER, // 5CDA
-
- // Thermal Printer
- PRINT_ON, // 5CDB
- PRINT_OFF, // 5CDC
-
- // Bluetooth: output selection
- OUT_AUTO, // 5CDD
- OUT_USB, // 5CDE
-
- // Clear EEPROM
- QK_CLEAR_EEPROM, // 5CDF
-
- // Unicode
- QK_UNICODE_MODE_NEXT, // 5CE0
- QK_UNICODE_MODE_PREVIOUS, // 5CE1
- QK_UNICODE_MODE_MACOS, // 5CE2
- QK_UNICODE_MODE_LINUX, // 5CE3
- QK_UNICODE_MODE_WINDOWS, // 5CE4
- QK_UNICODE_MODE_BSD, // 5CE5
- QK_UNICODE_MODE_WINCOMPOSE, // 5CE6
-
- // Haptic
- HPT_ON, // 5CE7
- HPT_OFF, // 5CE8
- HPT_TOG, // 5CE9
- HPT_RST, // 5CEA
- HPT_FBK, // 5CEB
- HPT_BUZ, // 5CEC
- HPT_MODI, // 5CED
- HPT_MODD, // 5CEE
- HPT_CONT, // 5CEF
- HPT_CONI, // 5CF0
- HPT_COND, // 5CF1
- HPT_DWLI, // 5CF2
- HPT_DWLD, // 5CF3
-
- // Space Cadet (continued)
- QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN, // 5CF4
- QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE, // 5CF5
- QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN, // 5CF6
- QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE, // 5CF7
-
- // Combos
- QK_COMBO_ON, // 5CF8
- QK_COMBO_OFF, // 5CF9
- QK_COMBO_TOGGLE, // 5CFA
-
- // Magic (continued)
- MAGIC_SWAP_LCTL_LGUI, // 5CFB
- MAGIC_SWAP_RCTL_RGUI, // 5CFC
- MAGIC_UNSWAP_LCTL_LGUI, // 5CFD
- MAGIC_UNSWAP_RCTL_RGUI, // 5CFE
- MAGIC_SWAP_CTL_GUI, // 5CFF
- MAGIC_UNSWAP_CTL_GUI, // 5D00
- MAGIC_TOGGLE_CTL_GUI, // 5D01
- MAGIC_EE_HANDS_LEFT, // 5D02
- MAGIC_EE_HANDS_RIGHT, // 5D03
-
- // Dynamic Macros
- QK_DYNAMIC_MACRO_RECORD_START_1, // 5D04
- QK_DYNAMIC_MACRO_RECORD_START_2, // 5D05
- QK_DYNAMIC_MACRO_RECORD_STOP, // 5D06
- QK_DYNAMIC_MACRO_PLAY_1, // 5D07
- QK_DYNAMIC_MACRO_PLAY_2, // 5D08
-
- // Joystick
- QK_JOYSTICK_BUTTON_0, // 5D09
- QK_JOYSTICK_BUTTON_1, // 5D0A
- QK_JOYSTICK_BUTTON_2, // 5D0B
- QK_JOYSTICK_BUTTON_3, // 5D0C
- QK_JOYSTICK_BUTTON_4, // 5D0D
- QK_JOYSTICK_BUTTON_5, // 5D0E
- QK_JOYSTICK_BUTTON_6, // 5D0F
- QK_JOYSTICK_BUTTON_7, // 5D10
- QK_JOYSTICK_BUTTON_8, // 5D11
- QK_JOYSTICK_BUTTON_9, // 5D12
- QK_JOYSTICK_BUTTON_10, // 5D13
- QK_JOYSTICK_BUTTON_11, // 5D14
- QK_JOYSTICK_BUTTON_12, // 5D15
- QK_JOYSTICK_BUTTON_13, // 5D16
- QK_JOYSTICK_BUTTON_14, // 5D17
- QK_JOYSTICK_BUTTON_15, // 5D18
- QK_JOYSTICK_BUTTON_16, // 5D19
- QK_JOYSTICK_BUTTON_17, // 5D1A
- QK_JOYSTICK_BUTTON_18, // 5D1B
- QK_JOYSTICK_BUTTON_19, // 5D1C
- QK_JOYSTICK_BUTTON_20, // 5D1D
- QK_JOYSTICK_BUTTON_21, // 5D1E
- QK_JOYSTICK_BUTTON_22, // 5D1F
- QK_JOYSTICK_BUTTON_23, // 5D20
- QK_JOYSTICK_BUTTON_24, // 5D21
- QK_JOYSTICK_BUTTON_25, // 5D22
- QK_JOYSTICK_BUTTON_26, // 5D23
- QK_JOYSTICK_BUTTON_27, // 5D24
- QK_JOYSTICK_BUTTON_28, // 5D25
- QK_JOYSTICK_BUTTON_29, // 5D26
- QK_JOYSTICK_BUTTON_30, // 5D27
- QK_JOYSTICK_BUTTON_31, // 5D28
-
- // Leader Key
- QK_LEADER, // 5D29
-
- // Bluetooth: output selection (continued)
- OUT_BT, // 5D2A
-
- // Lock Key
- QK_LOCK, // 5D2B
-
- // Unused slots
- UNUSED_000, // 5D2C
- UNUSED_001, // 5D2D
-
- // Sequencer
- SQ_ON, // 5D2E
- SQ_OFF, // 5D2F
- SQ_TOG, // 5D30
-
- SQ_TMPD, // 5D31
- SQ_TMPU, // 5D32
-
- SQ_RESD, // 5D33
- SQ_RESU, // 5D34
-
- SQ_SALL, // 5D35
- SQ_SCLR, // 5D36
-
- SEQUENCER_STEP_MIN, // 5D37
- SEQUENCER_STEP_MAX = SEQUENCER_STEP_MIN + SEQUENCER_STEPS,
-
- SEQUENCER_RESOLUTION_MIN,
- SEQUENCER_RESOLUTION_MAX = SEQUENCER_RESOLUTION_MIN + SEQUENCER_RESOLUTIONS,
-
- SEQUENCER_TRACK_MIN,
- SEQUENCER_TRACK_MAX = SEQUENCER_TRACK_MIN + SEQUENCER_TRACKS,
+// Pull in dd keycodes to maintain header compatibility
+#include "keycodes.h"
-#define SQ_S(n) (n < SEQUENCER_STEPS ? SEQUENCER_STEP_MIN + n : KC_NO)
-#define SQ_R(n) (n < SEQUENCER_RESOLUTIONS ? SEQUENCER_RESOLUTION_MIN + n : KC_NO)
-#define SQ_T(n) (n < SEQUENCER_TRACKS ? SEQUENCER_TRACK_MIN + n : KC_NO)
+// US ANSI shifted keycode aliases
+#include "keymap_us.h"
- // One Shot
- QK_ONE_SHOT_ON,
- QK_ONE_SHOT_OFF,
- QK_ONE_SHOT_TOGGLE,
-
- // RGB underglow/matrix (continued)
- RGB_MODE_TWINKLE,
-
- // Key Overrides
- QK_KEY_OVERRIDE_TOGGLE,
- QK_KEY_OVERRIDE_ON,
- QK_KEY_OVERRIDE_OFF,
-
- // Additional magic key
- MAGIC_TOGGLE_GUI,
-
- // Adjust tapping term on the fly
- DT_PRNT,
- DT_UP,
- DT_DOWN,
-
- // Programmable Button
- QK_PROGRAMMABLE_BUTTON_1,
- QK_PROGRAMMABLE_BUTTON_2,
- QK_PROGRAMMABLE_BUTTON_3,
- QK_PROGRAMMABLE_BUTTON_4,
- QK_PROGRAMMABLE_BUTTON_5,
- QK_PROGRAMMABLE_BUTTON_6,
- QK_PROGRAMMABLE_BUTTON_7,
- QK_PROGRAMMABLE_BUTTON_8,
- QK_PROGRAMMABLE_BUTTON_9,
- QK_PROGRAMMABLE_BUTTON_10,
- QK_PROGRAMMABLE_BUTTON_11,
- QK_PROGRAMMABLE_BUTTON_12,
- QK_PROGRAMMABLE_BUTTON_13,
- QK_PROGRAMMABLE_BUTTON_14,
- QK_PROGRAMMABLE_BUTTON_15,
- QK_PROGRAMMABLE_BUTTON_16,
- QK_PROGRAMMABLE_BUTTON_17,
- QK_PROGRAMMABLE_BUTTON_18,
- QK_PROGRAMMABLE_BUTTON_19,
- QK_PROGRAMMABLE_BUTTON_20,
- QK_PROGRAMMABLE_BUTTON_21,
- QK_PROGRAMMABLE_BUTTON_22,
- QK_PROGRAMMABLE_BUTTON_23,
- QK_PROGRAMMABLE_BUTTON_24,
- QK_PROGRAMMABLE_BUTTON_25,
- QK_PROGRAMMABLE_BUTTON_26,
- QK_PROGRAMMABLE_BUTTON_27,
- QK_PROGRAMMABLE_BUTTON_28,
- QK_PROGRAMMABLE_BUTTON_29,
- QK_PROGRAMMABLE_BUTTON_30,
- QK_PROGRAMMABLE_BUTTON_31,
- QK_PROGRAMMABLE_BUTTON_32,
-
- // Dedicated macro keys for Configurator and VIA
- MACRO_0,
- MACRO_1,
- MACRO_2,
- MACRO_3,
- MACRO_4,
- MACRO_5,
- MACRO_6,
- MACRO_7,
- MACRO_8,
- MACRO_9,
- MACRO_10,
- MACRO_11,
- MACRO_12,
- MACRO_13,
- MACRO_14,
- MACRO_15,
- MACRO_16,
- MACRO_17,
- MACRO_18,
- MACRO_19,
- MACRO_20,
- MACRO_21,
- MACRO_22,
- MACRO_23,
- MACRO_24,
- MACRO_25,
- MACRO_26,
- MACRO_27,
- MACRO_28,
- MACRO_29,
- MACRO_30,
- MACRO_31,
-
- MAGIC_TOGGLE_CONTROL_CAPSLOCK,
-
- QK_MAKE,
- QK_REBOOT,
-
- QK_SECURE_LOCK,
- QK_SECURE_UNLOCK,
- QK_SECURE_TOGGLE,
- QK_SECURE_REQUEST,
-
- QK_CAPS_WORD_TOGGLE,
-
- MAGIC_SWAP_ESCAPE_CAPSLOCK,
- MAGIC_UNSWAP_ESCAPE_CAPSLOCK,
- MAGIC_TOGGLE_ESCAPE_CAPSLOCK,
-
- QK_UNICODE_MODE_EMACS,
-
- QK_AUTOCORRECT_ON,
- QK_AUTOCORRECT_OFF,
- QK_AUTOCORRECT_TOGGLE,
-
- MAGIC_TOGGLE_BACKSLASH_BACKSPACE,
-
- // Start of custom keycode range for keyboards and keymaps - always leave at the end
- SAFE_RANGE
-};
+// TODO: sub-ranges?
+// clang-format off
+#define QK_LCTL 0x0100
+#define QK_LSFT 0x0200
+#define QK_LALT 0x0400
+#define QK_LGUI 0x0800
+#define QK_RMODS_MIN 0x1000
+#define QK_RCTL 0x1100
+#define QK_RSFT 0x1200
+#define QK_RALT 0x1400
+#define QK_RGUI 0x1800
+#define QK_UNICODEMAP 0x8000
+#define QK_UNICODEMAP_MAX 0xBFFF
+#define QK_UNICODEMAP_PAIR 0xC000
+#define QK_UNICODEMAP_PAIR_MAX 0xFFFF
+// clang-format on
// Keycode modifiers & aliases
#define LCTL(kc) (QK_LCTL | (kc))
@@ -654,122 +72,35 @@ enum quantum_keycodes {
#define RCS(kc) (QK_RCTL | QK_RSFT | (kc))
#define SAGR(kc) RSA(kc)
-#define MOD_HYPR 0xF
-#define MOD_MEH 0x7
-
-// US ANSI shifted keycode aliases
-#include "keymap_us.h"
-
// Modified keycode aliases
#define C(kc) LCTL(kc)
#define S(kc) LSFT(kc)
#define A(kc) LALT(kc)
#define G(kc) LGUI(kc)
-#define QK_GESC QK_GRAVE_ESCAPE
-
-#define QK_BOOT QK_BOOTLOADER
-#define DB_TOGG QK_DEBUG_TOGGLE
-#define EE_CLR QK_CLEAR_EEPROM
-#define QK_RBT QK_REBOOT
-
-// Audio Clicky aliases
-#define CK_TOGG CLICKY_TOGGLE
-#define CK_RST CLICKY_RESET
-#define CK_UP CLICKY_UP
-#define CK_DOWN CLICKY_DOWN
-#define CK_ON CLICKY_ENABLE
-#define CK_OFF CLICKY_DISABLE
-
-// RGB aliases
-#define RGB_MOD RGB_MODE_FORWARD
-#define RGB_RMOD RGB_MODE_REVERSE
-#define RGB_M_P RGB_MODE_PLAIN
-#define RGB_M_B RGB_MODE_BREATHE
-#define RGB_M_R RGB_MODE_RAINBOW
-#define RGB_M_SW RGB_MODE_SWIRL
-#define RGB_M_SN RGB_MODE_SNAKE
-#define RGB_M_K RGB_MODE_KNIGHT
-#define RGB_M_X RGB_MODE_XMAS
-#define RGB_M_G RGB_MODE_GRADIENT
-#define RGB_M_T RGB_MODE_RGBTEST
-#define RGB_M_TW RGB_MODE_TWINKLE
-
-// Magic aliases
-#define CL_SWAP MAGIC_SWAP_CONTROL_CAPSLOCK
-#define CL_NORM MAGIC_UNSWAP_CONTROL_CAPSLOCK
-#define CL_CTRL MAGIC_CAPSLOCK_TO_CONTROL
-#define CL_CAPS MAGIC_UNCAPSLOCK_TO_CONTROL
-#define CL_TOGG MAGIC_TOGGLE_CONTROL_CAPSLOCK
-
-#define EC_SWAP MAGIC_SWAP_ESCAPE_CAPSLOCK
-#define EC_NORM MAGIC_UNSWAP_ESCAPE_CAPSLOCK
-#define EC_TOGG MAGIC_TOGGLE_ESCAPE_CAPSLOCK
-
-#define LCG_SWP MAGIC_SWAP_LCTL_LGUI
-#define LCG_NRM MAGIC_UNSWAP_LCTL_LGUI
-#define RCG_SWP MAGIC_SWAP_RCTL_RGUI
-#define RCG_NRM MAGIC_UNSWAP_RCTL_RGUI
-#define CG_SWAP MAGIC_SWAP_CTL_GUI
-#define CG_NORM MAGIC_UNSWAP_CTL_GUI
-#define CG_TOGG MAGIC_TOGGLE_CTL_GUI
-
-#define LAG_SWP MAGIC_SWAP_LALT_LGUI
-#define LAG_NRM MAGIC_UNSWAP_LALT_LGUI
-#define RAG_SWP MAGIC_SWAP_RALT_RGUI
-#define RAG_NRM MAGIC_UNSWAP_RALT_RGUI
-#define AG_SWAP MAGIC_SWAP_ALT_GUI
-#define AG_NORM MAGIC_UNSWAP_ALT_GUI
-#define AG_TOGG MAGIC_TOGGLE_ALT_GUI
-
-#define GUI_OFF MAGIC_NO_GUI
-#define GUI_ON MAGIC_UNNO_GUI
-#define GUI_TOG MAGIC_TOGGLE_GUI
-
-#define GE_SWAP MAGIC_SWAP_GRAVE_ESC
-#define GE_NORM MAGIC_UNSWAP_GRAVE_ESC
-
-#define BS_SWAP MAGIC_SWAP_BACKSLASH_BACKSPACE
-#define BS_NORM MAGIC_UNSWAP_BACKSLASH_BACKSPACE
-#define BS_TOGG MAGIC_TOGGLE_BACKSLASH_BACKSPACE
-
-#define NK_ON MAGIC_HOST_NKRO
-#define NK_OFF MAGIC_UNHOST_NKRO
-#define NK_TOGG MAGIC_TOGGLE_NKRO
-
-#define EH_LEFT MAGIC_EE_HANDS_LEFT
-#define EH_RGHT MAGIC_EE_HANDS_RIGHT
-
-#define AC_ON QK_AUTOCORRECT_ON
-#define AC_OFF QK_AUTOCORRECT_OFF
-#define AC_TOGG QK_AUTOCORRECT_TOGGLE
-
-// Velocikey
-#define VK_TOGG QK_VELOCIKEY_TOGGLE
-
-// GOTO layer - 256 layer max
-#define TO(layer) (QK_TO | ((layer)&0xFF))
-
-// Momentary switch layer - 256 layer max
-#define MO(layer) (QK_MOMENTARY | ((layer)&0xFF))
-
-// Set default layer - 256 layer max
-#define DF(layer) (QK_DEF_LAYER | ((layer)&0xFF))
-
-// Toggle to layer - 256 layer max
-#define TG(layer) (QK_TOGGLE_LAYER | ((layer)&0xFF))
-
-// One-shot layer - 256 layer max
-#define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer)&0xFF))
-
-// L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max, left mods only
-#define LM(layer, mod) (QK_LAYER_MOD | (((layer)&0xF) << 4) | ((mod)&0xF))
+// GOTO layer - 32 layer max
+#define TO(layer) (QK_TO | ((layer)&0x1F))
+
+// Momentary switch layer - 32 layer max
+#define MO(layer) (QK_MOMENTARY | ((layer)&0x1F))
+
+// Set default layer - 32 layer max
+#define DF(layer) (QK_DEF_LAYER | ((layer)&0x1F))
+
+// Toggle to layer - 32 layer max
+#define TG(layer) (QK_TOGGLE_LAYER | ((layer)&0x1F))
+
+// One-shot layer - 32 layer max
+#define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer)&0x1F))
+
+// L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max
+#define LM(layer, mod) (QK_LAYER_MOD | (((layer)&0xF) << 5) | ((mod)&0x1F))
// One-shot mod
-#define OSM(mod) (QK_ONE_SHOT_MOD | ((mod)&0xFF))
+#define OSM(mod) (QK_ONE_SHOT_MOD | ((mod)&0x1F))
-// Layer tap-toggle
-#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer)&0xFF))
+// Layer tap-toggle - 32 layer max
+#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer)&0x1F))
// L-ayer, T-ap - 256 keycode max, 16 layer max
#define LT(layer, kc) (QK_LAYER_TAP | (((layer)&0xF) << 8) | ((kc)&0xFF))
@@ -834,64 +165,8 @@ enum quantum_keycodes {
#define X(i) (QK_UNICODEMAP | (i))
#define XP(i, j) (QK_UNICODEMAP_PAIR | ((i)&0x7F) | (((j)&0x7F) << 7)) // 127 max i and j
-#define UC_NEXT QK_UNICODE_MODE_NEXT
-#define UC_PREV QK_UNICODE_MODE_PREVIOUS
-
-#define UC_MAC QK_UNICODE_MODE_MACOS
-#define UC_LINX QK_UNICODE_MODE_LINUX
-#define UC_WIN QK_UNICODE_MODE_WINDOWS
-#define UC_BSD QK_UNICODE_MODE_BSD
-#define UC_WINC QK_UNICODE_MODE_WINCOMPOSE
-#define UC_EMAC QK_UNICODE_MODE_EMACS
-
-// Auto Shift
-#define AS_UP QK_AUTO_SHIFT_UP
-#define AS_DOWN QK_AUTO_SHIFT_DOWN
-#define AS_RPT QK_AUTO_SHIFT_REPORT
-#define AS_TOGG QK_AUTO_SHIFT_TOGGLE
-#define AS_ON QK_AUTO_SHIFT_ON
-#define AS_OFF QK_AUTO_SHIFT_OFF
-
-// Leader key
-#define QK_LEAD QK_LEADER
-
-// Caps Word
-#define CW_TOGG QK_CAPS_WORD_TOGGLE
-
-// Key Overrides
-#define KO_TOGG QK_KEY_OVERRIDE_TOGGLE
-#define KO_ON QK_KEY_OVERRIDE_ON
-#define KO_OFF QK_KEY_OVERRIDE_OFF
-
-// Secure
-#define SE_LOCK QK_SECURE_LOCK
-#define SE_UNLK QK_SECURE_UNLOCK
-#define SE_TOGG QK_SECURE_TOGGLE
-#define SE_REQ QK_SECURE_REQUEST
-
-// Space Cadet
-#define SC_LSPO QK_SPACE_CADET_LEFT_SHIFT_PARENTHESIS_OPEN
-#define SC_RSPC QK_SPACE_CADET_RIGHT_SHIFT_PARENTHESIS_CLOSE
-#define SC_LCPO QK_SPACE_CADET_LEFT_CTRL_PARENTHESIS_OPEN
-#define SC_RCPC QK_SPACE_CADET_RIGHT_CTRL_PARENTHESIS_CLOSE
-#define SC_LAPO QK_SPACE_CADET_LEFT_ALT_PARENTHESIS_OPEN
-#define SC_RAPC QK_SPACE_CADET_RIGHT_ALT_PARENTHESIS_CLOSE
-#define SC_SENT QK_SPACE_CADET_RIGHT_SHIFT_ENTER
-
-// Combos
-#define CM_ON QK_COMBO_ON
-#define CM_OFF QK_COMBO_OFF
-#define CM_TOGG QK_COMBO_TOGGLE
-
// Swap Hands
#define SH_T(kc) (QK_SWAP_HANDS | (kc))
-#define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE)
-#define SH_TT (QK_SWAP_HANDS | OP_SH_TAP_TOGGLE)
-#define SH_OS (QK_SWAP_HANDS | OP_SH_ONESHOT)
-#define SH_MON (QK_SWAP_HANDS | OP_SH_ON_OFF)
-#define SH_MOFF (QK_SWAP_HANDS | OP_SH_OFF_ON)
-#define SH_ON (QK_SWAP_HANDS | OP_SH_ON)
-#define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF)
// MIDI aliases
#define MIDI_TONE_MIN MI_C
@@ -905,88 +180,20 @@ enum quantum_keycodes {
#define MIDI_CHANNEL_MIN MI_CH1
#define MIDI_CHANNEL_MAX MI_CH16
-// Dynamic Macros aliases
-#define DM_REC1 QK_DYNAMIC_MACRO_RECORD_START_1
-#define DM_REC2 QK_DYNAMIC_MACRO_RECORD_START_2
-#define DM_RSTP QK_DYNAMIC_MACRO_RECORD_STOP
-#define DM_PLY1 QK_DYNAMIC_MACRO_PLAY_1
-#define DM_PLY2 QK_DYNAMIC_MACRO_PLAY_2
-
-// Joystick aliases
-#define JS_0 QK_JOYSTICK_BUTTON_0
-#define JS_1 QK_JOYSTICK_BUTTON_1
-#define JS_2 QK_JOYSTICK_BUTTON_2
-#define JS_3 QK_JOYSTICK_BUTTON_3
-#define JS_4 QK_JOYSTICK_BUTTON_4
-#define JS_5 QK_JOYSTICK_BUTTON_5
-#define JS_6 QK_JOYSTICK_BUTTON_6
-#define JS_7 QK_JOYSTICK_BUTTON_7
-#define JS_8 QK_JOYSTICK_BUTTON_8
-#define JS_9 QK_JOYSTICK_BUTTON_9
-#define JS_10 QK_JOYSTICK_BUTTON_10
-#define JS_11 QK_JOYSTICK_BUTTON_11
-#define JS_12 QK_JOYSTICK_BUTTON_12
-#define JS_13 QK_JOYSTICK_BUTTON_13
-#define JS_14 QK_JOYSTICK_BUTTON_14
-#define JS_15 QK_JOYSTICK_BUTTON_15
-#define JS_16 QK_JOYSTICK_BUTTON_16
-#define JS_17 QK_JOYSTICK_BUTTON_17
-#define JS_18 QK_JOYSTICK_BUTTON_18
-#define JS_19 QK_JOYSTICK_BUTTON_19
-#define JS_20 QK_JOYSTICK_BUTTON_20
-#define JS_21 QK_JOYSTICK_BUTTON_21
-#define JS_22 QK_JOYSTICK_BUTTON_22
-#define JS_23 QK_JOYSTICK_BUTTON_23
-#define JS_24 QK_JOYSTICK_BUTTON_24
-#define JS_25 QK_JOYSTICK_BUTTON_25
-#define JS_26 QK_JOYSTICK_BUTTON_26
-#define JS_27 QK_JOYSTICK_BUTTON_27
-#define JS_28 QK_JOYSTICK_BUTTON_28
-#define JS_29 QK_JOYSTICK_BUTTON_29
-#define JS_30 QK_JOYSTICK_BUTTON_30
-#define JS_31 QK_JOYSTICK_BUTTON_31
-#define QK_JOYSTICK_BUTTON_MIN QK_JOYSTICK_BUTTON_0
-#define QK_JOYSTICK_BUTTON_MAX QK_JOYSTICK_BUTTON_31
-
-// One Shot aliases
-#define OS_TOGG QK_ONE_SHOT_TOGGLE
-#define OS_ON QK_ONE_SHOT_ON
-#define OS_OFF QK_ONE_SHOT_OFF
-
-// Programmable Button aliases
-#define PB_1 QK_PROGRAMMABLE_BUTTON_1
-#define PB_2 QK_PROGRAMMABLE_BUTTON_2
-#define PB_3 QK_PROGRAMMABLE_BUTTON_3
-#define PB_4 QK_PROGRAMMABLE_BUTTON_4
-#define PB_5 QK_PROGRAMMABLE_BUTTON_5
-#define PB_6 QK_PROGRAMMABLE_BUTTON_6
-#define PB_7 QK_PROGRAMMABLE_BUTTON_7
-#define PB_8 QK_PROGRAMMABLE_BUTTON_8
-#define PB_9 QK_PROGRAMMABLE_BUTTON_9
-#define PB_10 QK_PROGRAMMABLE_BUTTON_10
-#define PB_11 QK_PROGRAMMABLE_BUTTON_11
-#define PB_12 QK_PROGRAMMABLE_BUTTON_12
-#define PB_13 QK_PROGRAMMABLE_BUTTON_13
-#define PB_14 QK_PROGRAMMABLE_BUTTON_14
-#define PB_15 QK_PROGRAMMABLE_BUTTON_15
-#define PB_16 QK_PROGRAMMABLE_BUTTON_16
-#define PB_17 QK_PROGRAMMABLE_BUTTON_17
-#define PB_18 QK_PROGRAMMABLE_BUTTON_18
-#define PB_19 QK_PROGRAMMABLE_BUTTON_19
-#define PB_20 QK_PROGRAMMABLE_BUTTON_20
-#define PB_21 QK_PROGRAMMABLE_BUTTON_21
-#define PB_22 QK_PROGRAMMABLE_BUTTON_22
-#define PB_23 QK_PROGRAMMABLE_BUTTON_23
-#define PB_24 QK_PROGRAMMABLE_BUTTON_24
-#define PB_25 QK_PROGRAMMABLE_BUTTON_25
-#define PB_26 QK_PROGRAMMABLE_BUTTON_26
-#define PB_27 QK_PROGRAMMABLE_BUTTON_27
-#define PB_28 QK_PROGRAMMABLE_BUTTON_28
-#define PB_29 QK_PROGRAMMABLE_BUTTON_29
-#define PB_30 QK_PROGRAMMABLE_BUTTON_30
-#define PB_31 QK_PROGRAMMABLE_BUTTON_31
-#define PB_32 QK_PROGRAMMABLE_BUTTON_32
-#define QK_PROGRAMMABLE_BUTTON_MIN QK_PROGRAMMABLE_BUTTON_1
-#define QK_PROGRAMMABLE_BUTTON_MAX QK_PROGRAMMABLE_BUTTON_32
+// TODO: somehow migrate sequencer to DD?
+#include "sequencer.h"
+
+#define SEQUENCER_STEP_MIN (QK_SEQUENCER + 0xF)
+#define SEQUENCER_STEP_MAX (SEQUENCER_STEP_MIN + SEQUENCER_STEPS)
+
+#define SEQUENCER_RESOLUTION_MIN (SEQUENCER_STEP_MAX + 1)
+#define SEQUENCER_RESOLUTION_MAX (SEQUENCER_RESOLUTION_MIN + SEQUENCER_RESOLUTIONS)
+
+#define SEQUENCER_TRACK_MIN (SEQUENCER_RESOLUTION_MAX + 1)
+#define SEQUENCER_TRACK_MAX (SEQUENCER_TRACK_MIN + SEQUENCER_TRACKS)
+
+#define SQ_S(n) (n < SEQUENCER_STEPS ? SEQUENCER_STEP_MIN + n : KC_NO)
+#define SQ_R(n) (n < SEQUENCER_RESOLUTIONS ? SEQUENCER_RESOLUTION_MIN + n : KC_NO)
+#define SQ_T(n) (n < SEQUENCER_TRACKS ? SEQUENCER_TRACK_MIN + n : KC_NO)
#include "quantum_keycodes_legacy.h"
diff --git a/quantum/send_string/send_string_keycodes.h b/quantum/send_string/send_string_keycodes.h
index f9e1c101ff..54b8382053 100644
--- a/quantum/send_string/send_string_keycodes.h
+++ b/quantum/send_string/send_string_keycodes.h
@@ -389,48 +389,25 @@
#define X_ASSISTANT c0
/* Mouse Buttons (unallocated range in HID spec) */
-#ifdef VIA_ENABLE
-#define X_MS_UP f0
-#define X_MS_DOWN f1
-#define X_MS_LEFT f2
-#define X_MS_RIGHT f3
-#define X_MS_BTN1 f4
-#define X_MS_BTN2 f5
-#define X_MS_BTN3 f6
-#define X_MS_BTN4 f7
-#define X_MS_BTN5 f8
-#define X_MS_BTN6 f8
-#define X_MS_BTN7 f8
-#define X_MS_BTN8 f8
-#define X_MS_WH_UP f9
-#define X_MS_WH_DOWN fa
-#define X_MS_WH_LEFT fb
-#define X_MS_WH_RIGHT fc
-#define X_MS_ACCEL0 fd
-#define X_MS_ACCEL1 fe
-#define X_MS_ACCEL2 ff
-#else
-#define X_MS_UP cd
-#define X_MS_DOWN ce
-#define X_MS_LEFT cf
-#define X_MS_RIGHT d0
-#define X_MS_BTN1 d1
-#define X_MS_BTN2 d2
-#define X_MS_BTN3 d3
-#define X_MS_BTN4 d4
-#define X_MS_BTN5 d5
-#define X_MS_BTN6 d6
-#define X_MS_BTN7 d7
-#define X_MS_BTN8 d8
-#define X_MS_WH_UP d9
-#define X_MS_WH_DOWN da
-#define X_MS_WH_LEFT db
-#define X_MS_WH_RIGHT dc
-#define X_MS_ACCEL0 dd
-#define X_MS_ACCEL1 de
-#define X_MS_ACCEL2 df
-#endif
-
+#define X_MS_UP cd
+#define X_MS_DOWN ce
+#define X_MS_LEFT cf
+#define X_MS_RIGHT d0
+#define X_MS_BTN1 d1
+#define X_MS_BTN2 d2
+#define X_MS_BTN3 d3
+#define X_MS_BTN4 d4
+#define X_MS_BTN5 d5
+#define X_MS_BTN6 d6
+#define X_MS_BTN7 d7
+#define X_MS_BTN8 d8
+#define X_MS_WH_UP d9
+#define X_MS_WH_DOWN da
+#define X_MS_WH_LEFT db
+#define X_MS_WH_RIGHT dc
+#define X_MS_ACCEL0 dd
+#define X_MS_ACCEL1 de
+#define X_MS_ACCEL2 df
// Send string macros
#define STRINGIZE(z) #z
diff --git a/quantum/via.c b/quantum/via.c
index 37e2046a10..5afbee5a30 100644
--- a/quantum/via.c
+++ b/quantum/via.c
@@ -50,7 +50,6 @@
#include "dynamic_keymap.h"
#include "eeprom.h"
#include "version.h" // for QMK_BUILDDATE used in EEPROM magic
-#include "via_ensure_keycode.h"
// Forward declare some helpers.
#if defined(VIA_QMK_BACKLIGHT_ENABLE)
diff --git a/quantum/via.h b/quantum/via.h
index 558ae95de4..84b264903f 100644
--- a/quantum/via.h
+++ b/quantum/via.h
@@ -58,7 +58,7 @@
// This is changed only when the command IDs change,
// so VIA Configurator can detect compatible firmware.
-#define VIA_PROTOCOL_VERSION 0x000A
+#define VIA_PROTOCOL_VERSION 0x000B
enum via_command_id {
id_get_protocol_version = 0x01, // always 0x01
@@ -103,13 +103,8 @@ enum via_lighting_value {
id_qmk_rgblight_color = 0x83,
};
-// Can't use SAFE_RANGE here, it might change if someone adds
-// new values to enum quantum_keycodes.
-// Need to keep checking 0x5F10 is still in the safe range.
-// TODO: merge this into quantum_keycodes
-// Backlight keycodes are in range 0x5F00-0x5F0F
enum via_keycodes {
- FN_MO13 = 0x5F10,
+ FN_MO13 = QK_MACRO,
FN_MO23,
MACRO00,
MACRO01,
@@ -130,7 +125,7 @@ enum via_keycodes {
};
enum user_keycodes {
- USER00 = 0x5F80,
+ USER00 = QK_USER,
USER01,
USER02,
USER03,
diff --git a/quantum/via_ensure_keycode.h b/quantum/via_ensure_keycode.h
deleted file mode 100644
index 48e611d0fa..0000000000
--- a/quantum/via_ensure_keycode.h
+++ /dev/null
@@ -1,344 +0,0 @@
-#pragma once
-
-#include "quantum.h"
-#include "via.h"
-
-#ifndef VIA_HAS_BROKEN_KEYCODES
-
-// clang-format off
-
-_Static_assert(KC_NO == 0x0000, "");
-_Static_assert(KC_TRANSPARENT == 0x0001, "");
-
-_Static_assert(KC_A == 0x0004, "");
-_Static_assert(KC_B == 0x0005, "");
-_Static_assert(KC_C == 0x0006, "");
-_Static_assert(KC_D == 0x0007, "");
-_Static_assert(KC_E == 0x0008, "");
-_Static_assert(KC_F == 0x0009, "");
-_Static_assert(KC_G == 0x000A, "");
-_Static_assert(KC_H == 0x000B, "");
-_Static_assert(KC_I == 0x000C, "");
-_Static_assert(KC_J == 0x000D, "");
-_Static_assert(KC_K == 0x000E, "");
-_Static_assert(KC_L == 0x000F, "");
-_Static_assert(KC_M == 0x0010, "");
-_Static_assert(KC_N == 0x0011, "");
-_Static_assert(KC_O == 0x0012, "");
-_Static_assert(KC_P == 0x0013, "");
-_Static_assert(KC_Q == 0x0014, "");
-_Static_assert(KC_R == 0x0015, "");
-_Static_assert(KC_S == 0x0016, "");
-_Static_assert(KC_T == 0x0017, "");
-_Static_assert(KC_U == 0x0018, "");
-_Static_assert(KC_V == 0x0019, "");
-_Static_assert(KC_W == 0x001A, "");
-_Static_assert(KC_X == 0x001B, "");
-_Static_assert(KC_Y == 0x001C, "");
-_Static_assert(KC_Z == 0x001D, "");
-_Static_assert(KC_1 == 0x001E, "");
-_Static_assert(KC_2 == 0x001F, "");
-_Static_assert(KC_3 == 0x0020, "");
-_Static_assert(KC_4 == 0x0021, "");
-_Static_assert(KC_5 == 0x0022, "");
-_Static_assert(KC_6 == 0x0023, "");
-_Static_assert(KC_7 == 0x0024, "");
-_Static_assert(KC_8 == 0x0025, "");
-_Static_assert(KC_9 == 0x0026, "");
-_Static_assert(KC_0 == 0x0027, "");
-_Static_assert(KC_ENTER == 0x0028, "");
-_Static_assert(KC_ESCAPE == 0x0029, "");
-_Static_assert(KC_BACKSPACE == 0x002A, "");
-_Static_assert(KC_TAB == 0x002B, "");
-_Static_assert(KC_SPACE == 0x002C, "");
-_Static_assert(KC_MINUS == 0x002D, "");
-_Static_assert(KC_EQUAL == 0x002E, "");
-_Static_assert(KC_LEFT_BRACKET == 0x002F, "");
-_Static_assert(KC_RIGHT_BRACKET == 0x0030, "");
-_Static_assert(KC_BACKSLASH == 0x0031, "");
-_Static_assert(KC_NONUS_HASH == 0x0032, "");
-_Static_assert(KC_SEMICOLON == 0x0033, "");
-_Static_assert(KC_QUOTE == 0x0034, "");
-_Static_assert(KC_GRAVE == 0x0035, "");
-_Static_assert(KC_COMMA == 0x0036, "");
-_Static_assert(KC_DOT == 0x0037, "");
-_Static_assert(KC_SLASH == 0x0038, "");
-_Static_assert(KC_CAPS_LOCK == 0x0039, "");
-_Static_assert(KC_F1 == 0x003A, "");
-_Static_assert(KC_F2 == 0x003B, "");
-_Static_assert(KC_F3 == 0x003C, "");
-_Static_assert(KC_F4 == 0x003D, "");
-_Static_assert(KC_F5 == 0x003E, "");
-_Static_assert(KC_F6 == 0x003F, "");
-_Static_assert(KC_F7 == 0x0040, "");
-_Static_assert(KC_F8 == 0x0041, "");
-_Static_assert(KC_F9 == 0x0042, "");
-_Static_assert(KC_F10 == 0x0043, "");
-_Static_assert(KC_F11 == 0x0044, "");
-_Static_assert(KC_F12 == 0x0045, "");
-_Static_assert(KC_PRINT_SCREEN == 0x0046, "");
-_Static_assert(KC_SCROLL_LOCK == 0x0047, "");
-_Static_assert(KC_PAUSE == 0x0048, "");
-_Static_assert(KC_INSERT == 0x0049, "");
-_Static_assert(KC_HOME == 0x004A, "");
-_Static_assert(KC_PAGE_UP == 0x004B, "");
-_Static_assert(KC_DELETE == 0x004C, "");
-_Static_assert(KC_END == 0x004D, "");
-_Static_assert(KC_PAGE_DOWN == 0x004E, "");
-_Static_assert(KC_RIGHT == 0x004F, "");
-_Static_assert(KC_LEFT == 0x0050, "");
-_Static_assert(KC_DOWN == 0x0051, "");
-_Static_assert(KC_UP == 0x0052, "");
-_Static_assert(KC_NUM_LOCK == 0x0053, "");
-_Static_assert(KC_KP_SLASH == 0x0054, "");
-_Static_assert(KC_KP_ASTERISK == 0x0055, "");
-_Static_assert(KC_KP_MINUS == 0x0056, "");
-_Static_assert(KC_KP_PLUS == 0x0057, "");
-_Static_assert(KC_KP_ENTER == 0x0058, "");
-_Static_assert(KC_KP_1 == 0x0059, "");
-_Static_assert(KC_KP_2 == 0x005A, "");
-_Static_assert(KC_KP_3 == 0x005B, "");
-_Static_assert(KC_KP_4 == 0x005C, "");
-_Static_assert(KC_KP_5 == 0x005D, "");
-_Static_assert(KC_KP_6 == 0x005E, "");
-_Static_assert(KC_KP_7 == 0x005F, "");
-_Static_assert(KC_KP_8 == 0x0060, "");
-_Static_assert(KC_KP_9 == 0x0061, "");
-_Static_assert(KC_KP_0 == 0x0062, "");
-_Static_assert(KC_KP_DOT == 0x0063, "");
-_Static_assert(KC_NONUS_BACKSLASH == 0x0064, "");
-_Static_assert(KC_APPLICATION == 0x0065, "");
-_Static_assert(KC_KB_POWER == 0x0066, "");
-_Static_assert(KC_KP_EQUAL == 0x0067, "");
-_Static_assert(KC_F13 == 0x0068, "");
-_Static_assert(KC_F14 == 0x0069, "");
-_Static_assert(KC_F15 == 0x006A, "");
-_Static_assert(KC_F16 == 0x006B, "");
-_Static_assert(KC_F17 == 0x006C, "");
-_Static_assert(KC_F18 == 0x006D, "");
-_Static_assert(KC_F19 == 0x006E, "");
-_Static_assert(KC_F20 == 0x006F, "");
-_Static_assert(KC_F21 == 0x0070, "");
-_Static_assert(KC_F22 == 0x0071, "");
-_Static_assert(KC_F23 == 0x0072, "");
-_Static_assert(KC_F24 == 0x0073, "");
-_Static_assert(KC_EXECUTE == 0x0074, "");
-_Static_assert(KC_HELP == 0x0075, "");
-_Static_assert(KC_MENU == 0x0076, "");
-_Static_assert(KC_SELECT == 0x0077, "");
-_Static_assert(KC_STOP == 0x0078, "");
-_Static_assert(KC_AGAIN == 0x0079, "");
-_Static_assert(KC_UNDO == 0x007A, "");
-_Static_assert(KC_CUT == 0x007B, "");
-_Static_assert(KC_COPY == 0x007C, "");
-_Static_assert(KC_PASTE == 0x007D, "");
-_Static_assert(KC_FIND == 0x007E, "");
-
-_Static_assert(KC_LOCKING_CAPS_LOCK == 0x0082, "");
-_Static_assert(KC_LOCKING_NUM_LOCK == 0x0083, "");
-_Static_assert(KC_LOCKING_SCROLL_LOCK == 0x0084, "");
-_Static_assert(KC_KP_COMMA == 0x0085, "");
-_Static_assert(KC_KP_EQUAL_AS400 == 0x0086, "");
-_Static_assert(KC_INTERNATIONAL_1 == 0x0087, "");
-_Static_assert(KC_INTERNATIONAL_2 == 0x0088, "");
-_Static_assert(KC_INTERNATIONAL_3 == 0x0089, "");
-_Static_assert(KC_INTERNATIONAL_4 == 0x008A, "");
-_Static_assert(KC_INTERNATIONAL_5 == 0x008B, "");
-_Static_assert(KC_INTERNATIONAL_6 == 0x008C, "");
-_Static_assert(KC_INTERNATIONAL_7 == 0x008D, "");
-_Static_assert(KC_INTERNATIONAL_8 == 0x008E, "");
-_Static_assert(KC_INTERNATIONAL_9 == 0x008F, "");
-_Static_assert(KC_LANGUAGE_1 == 0x0090, "");
-_Static_assert(KC_LANGUAGE_2 == 0x0091, "");
-_Static_assert(KC_LANGUAGE_3 == 0x0092, "");
-_Static_assert(KC_LANGUAGE_4 == 0x0093, "");
-_Static_assert(KC_LANGUAGE_5 == 0x0094, "");
-_Static_assert(KC_LANGUAGE_6 == 0x0095, "");
-_Static_assert(KC_LANGUAGE_7 == 0x0096, "");
-_Static_assert(KC_LANGUAGE_8 == 0x0097, "");
-_Static_assert(KC_LANGUAGE_9 == 0x0098, "");
-_Static_assert(KC_ALTERNATE_ERASE == 0x0099, "");
-_Static_assert(KC_SYSTEM_REQUEST == 0x009A, "");
-_Static_assert(KC_CANCEL == 0x009B, "");
-_Static_assert(KC_CLEAR == 0x009C, "");
-_Static_assert(KC_PRIOR == 0x009D, "");
-
-_Static_assert(KC_OUT == 0x00A0, "");
-_Static_assert(KC_OPER == 0x00A1, "");
-_Static_assert(KC_CLEAR_AGAIN == 0x00A2, "");
-_Static_assert(KC_CRSEL == 0x00A3, "");
-_Static_assert(KC_EXSEL == 0x00A4, "");
-
-_Static_assert(KC_PWR == 0x00A5, "");
-_Static_assert(KC_SLEP == 0x00A6, "");
-_Static_assert(KC_WAKE == 0x00A7, "");
-_Static_assert(KC_MUTE == 0x00A8, "");
-_Static_assert(KC_VOLU == 0x00A9, "");
-_Static_assert(KC_VOLD == 0x00AA, "");
-_Static_assert(KC_MNXT == 0x00AB, "");
-_Static_assert(KC_MPRV == 0x00AC, "");
-_Static_assert(KC_MSTP == 0x00AD, "");
-_Static_assert(KC_MPLY == 0x00AE, "");
-_Static_assert(KC_MSEL == 0x00AF, "");
-_Static_assert(KC_EJCT == 0x00B0, "");
-_Static_assert(KC_MAIL == 0x00B1, "");
-_Static_assert(KC_CALC == 0x00B2, "");
-_Static_assert(KC_MYCM == 0x00B3, "");
-_Static_assert(KC_WSCH == 0x00B4, "");
-_Static_assert(KC_WHOM == 0x00B5, "");
-_Static_assert(KC_WBAK == 0x00B6, "");
-_Static_assert(KC_WFWD == 0x00B7, "");
-_Static_assert(KC_WSTP == 0x00B8, "");
-_Static_assert(KC_WREF == 0x00B9, "");
-_Static_assert(KC_WFAV == 0x00BA, "");
-_Static_assert(KC_MFFD == 0x00BB, "");
-_Static_assert(KC_MRWD == 0x00BC, "");
-_Static_assert(KC_BRIU == 0x00BD, "");
-_Static_assert(KC_BRID == 0x00BE, "");
-_Static_assert(KC_CPNL == 0x00BF, "");
-_Static_assert(KC_ASST == 0x00C0, "");
-
-_Static_assert(KC_LEFT_CTRL == 0x00E0, "");
-_Static_assert(KC_LEFT_SHIFT == 0x00E1, "");
-_Static_assert(KC_LEFT_ALT == 0x00E2, "");
-_Static_assert(KC_LEFT_GUI == 0x00E3, "");
-_Static_assert(KC_RIGHT_CTRL == 0x00E4, "");
-_Static_assert(KC_RIGHT_SHIFT == 0x00E5, "");
-_Static_assert(KC_RIGHT_ALT == 0x00E6, "");
-_Static_assert(KC_RIGHT_GUI == 0x00E7, "");
-
-_Static_assert(KC_MS_U == 0x00F0, "");
-_Static_assert(KC_MS_D == 0x00F1, "");
-_Static_assert(KC_MS_L == 0x00F2, "");
-_Static_assert(KC_MS_R == 0x00F3, "");
-_Static_assert(KC_BTN1 == 0x00F4, "");
-_Static_assert(KC_BTN2 == 0x00F5, "");
-_Static_assert(KC_BTN3 == 0x00F6, "");
-_Static_assert(KC_BTN4 == 0x00F7, "");
-_Static_assert(KC_BTN5 == 0x00F8, "");
-_Static_assert(KC_WH_U == 0x00F9, "");
-_Static_assert(KC_WH_D == 0x00FA, "");
-_Static_assert(KC_WH_L == 0x00FB, "");
-_Static_assert(KC_WH_R == 0x00FC, "");
-_Static_assert(KC_ACL0 == 0x00FD, "");
-_Static_assert(KC_ACL1 == 0x00FE, "");
-_Static_assert(KC_ACL2 == 0x00FF, "");
-
-_Static_assert(KC_EXLM == 0x021E, "");
-_Static_assert(KC_AT == 0x021F, "");
-_Static_assert(KC_HASH == 0x0220, "");
-_Static_assert(KC_DLR == 0x0221, "");
-_Static_assert(KC_PERC == 0x0222, "");
-_Static_assert(KC_CIRC == 0x0223, "");
-_Static_assert(KC_AMPR == 0x0224, "");
-_Static_assert(KC_ASTR == 0x0225, "");
-_Static_assert(KC_LPRN == 0x0226, "");
-_Static_assert(KC_RPRN == 0x0227, "");
-_Static_assert(KC_UNDS == 0x022D, "");
-_Static_assert(KC_PLUS == 0x022E, "");
-_Static_assert(KC_LCBR == 0x022F, "");
-_Static_assert(KC_RCBR == 0x0230, "");
-_Static_assert(KC_PIPE == 0x0231, "");
-_Static_assert(KC_COLN == 0x0233, "");
-_Static_assert(KC_DQUO == 0x0234, "");
-_Static_assert(KC_TILD == 0x0235, "");
-_Static_assert(KC_LT == 0x0236, "");
-_Static_assert(KC_GT == 0x0237, "");
-_Static_assert(KC_QUES == 0x0238, "");
-
-_Static_assert(QK_BOOTLOADER == 0x5C00, "");
-_Static_assert(QK_DEBUG_TOGGLE == 0x5C01, "");
-
-_Static_assert(MAGIC_TOGGLE_NKRO == 0x5C14, "");
-
-_Static_assert(QK_GRAVE_ESCAPE == 0x5C16, "");
-
-_Static_assert(AU_ON == 0x5C1D, "");
-_Static_assert(AU_OFF == 0x5C1E, "");
-_Static_assert(AU_TOG == 0x5C1F, "");
-
-_Static_assert(CLICKY_TOGGLE == 0x5C20, "");
-_Static_assert(CLICKY_ENABLE == 0x5C21, "");
-_Static_assert(CLICKY_DISABLE == 0x5C22, "");
-_Static_assert(CLICKY_UP == 0x5C23, "");
-_Static_assert(CLICKY_DOWN == 0x5C24, "");
-_Static_assert(CLICKY_RESET == 0x5C25, "");
-_Static_assert(MU_ON == 0x5C26, "");
-_Static_assert(MU_OFF == 0x5C27, "");
-_Static_assert(MU_TOG == 0x5C28, "");
-_Static_assert(MU_MOD == 0x5C29, "");
-
-_Static_assert(BL_ON == 0x5CBB, "");
-_Static_assert(BL_OFF == 0x5CBC, "");
-_Static_assert(BL_DEC == 0x5CBD, "");
-_Static_assert(BL_INC == 0x5CBE, "");
-_Static_assert(BL_TOGG == 0x5CBF, "");
-_Static_assert(BL_STEP == 0x5CC0, "");
-_Static_assert(BL_BRTG == 0x5CC1, "");
-_Static_assert(RGB_TOG == 0x5CC2, "");
-_Static_assert(RGB_MOD == 0x5CC3, "");
-_Static_assert(RGB_RMOD == 0x5CC4, "");
-_Static_assert(RGB_HUI == 0x5CC5, "");
-_Static_assert(RGB_HUD == 0x5CC6, "");
-_Static_assert(RGB_SAI == 0x5CC7, "");
-_Static_assert(RGB_SAD == 0x5CC8, "");
-_Static_assert(RGB_VAI == 0x5CC9, "");
-_Static_assert(RGB_VAD == 0x5CCA, "");
-_Static_assert(RGB_SPI == 0x5CCB, "");
-_Static_assert(RGB_SPD == 0x5CCC, "");
-_Static_assert(RGB_M_P == 0x5CCD, "");
-_Static_assert(RGB_M_B == 0x5CCE, "");
-_Static_assert(RGB_M_R == 0x5CCF, "");
-_Static_assert(RGB_M_SW == 0x5CD0, "");
-_Static_assert(RGB_M_SN == 0x5CD1, "");
-_Static_assert(RGB_M_K == 0x5CD2, "");
-_Static_assert(RGB_M_X == 0x5CD3, "");
-_Static_assert(RGB_M_G == 0x5CD4, "");
-_Static_assert(RGB_M_T == 0x5CD5, "");
-
-_Static_assert(SC_LSPO == 0x5CD7, "");
-_Static_assert(SC_RSPC == 0x5CD8, "");
-_Static_assert(SC_SENT == 0x5CD9, "");
-
-_Static_assert(SC_LCPO == 0x5CF3, "");
-_Static_assert(SC_RCPC == 0x5CF4, "");
-_Static_assert(SC_LAPO == 0x5CF5, "");
-_Static_assert(SC_RAPC == 0x5CF6, "");
-
-_Static_assert(FN_MO13 == 0x5F10, "");
-_Static_assert(FN_MO23 == 0x5F11, "");
-_Static_assert(MACRO00 == 0x5F12, "");
-_Static_assert(MACRO01 == 0x5F13, "");
-_Static_assert(MACRO02 == 0x5F14, "");
-_Static_assert(MACRO03 == 0x5F15, "");
-_Static_assert(MACRO04 == 0x5F16, "");
-_Static_assert(MACRO05 == 0x5F17, "");
-_Static_assert(MACRO06 == 0x5F18, "");
-_Static_assert(MACRO07 == 0x5F19, "");
-_Static_assert(MACRO08 == 0x5F1A, "");
-_Static_assert(MACRO09 == 0x5F1B, "");
-_Static_assert(MACRO10 == 0x5F1C, "");
-_Static_assert(MACRO11 == 0x5F1D, "");
-_Static_assert(MACRO12 == 0x5F1E, "");
-_Static_assert(MACRO13 == 0x5F1F, "");
-_Static_assert(MACRO14 == 0x5F20, "");
-_Static_assert(MACRO15 == 0x5F21, "");
-
-_Static_assert(USER00 == 0x5F80, "");
-_Static_assert(USER01 == 0x5F81, "");
-_Static_assert(USER02 == 0x5F82, "");
-_Static_assert(USER03 == 0x5F83, "");
-_Static_assert(USER04 == 0x5F84, "");
-_Static_assert(USER05 == 0x5F85, "");
-_Static_assert(USER06 == 0x5F86, "");
-_Static_assert(USER07 == 0x5F87, "");
-_Static_assert(USER08 == 0x5F88, "");
-_Static_assert(USER09 == 0x5F89, "");
-_Static_assert(USER10 == 0x5F8A, "");
-_Static_assert(USER11 == 0x5F8B, "");
-_Static_assert(USER12 == 0x5F8C, "");
-_Static_assert(USER13 == 0x5F8D, "");
-_Static_assert(USER14 == 0x5F8E, "");
-_Static_assert(USER15 == 0x5F8F, "");
-
-#endif