From f529580860cf5a1de4afc10432f218a45daae17a Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 4 Nov 2021 16:22:17 +1100 Subject: Basic keycode overhaul (#14726) --- quantum/action.c | 52 +- quantum/keycode.h | 272 ++++----- quantum/keycode_config.c | 66 +-- quantum/keycode_legacy.h | 53 ++ quantum/keymap_common.c | 4 +- quantum/keymap_extras/keymap_korean.h | 4 +- quantum/process_keycode/process_auto_shift.c | 16 +- quantum/process_keycode/process_haptic.c | 26 +- quantum/process_keycode/process_music.c | 6 +- quantum/process_keycode/process_printer.c | 32 +- quantum/process_keycode/process_printer_bb.c | 32 +- quantum/process_keycode/process_space_cadet.c | 24 +- quantum/process_keycode/process_terminal.c | 10 +- quantum/process_keycode/process_ucis.c | 18 +- quantum/process_keycode/process_unicode_common.c | 18 +- quantum/process_keycode/process_unicode_common.h | 4 +- quantum/quantum.c | 16 +- quantum/quantum_keycodes.h | 82 ++- quantum/via_ensure_keycode.h | 670 +++++++++++------------ quantum/wpm.c | 2 +- 20 files changed, 730 insertions(+), 677 deletions(-) create mode 100644 quantum/keycode_legacy.h (limited to 'quantum') diff --git a/quantum/action.c b/quantum/action.c index 5c33bd6d2c..ceaaa551f5 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -277,8 +277,8 @@ void process_action(keyrecord_t *record, action_t action) { if (event.pressed) { if (mods) { if (IS_MOD(action.key.code) || action.key.code == KC_NO) { - // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. - // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). + // e.g. LSFT(KC_LEFT_GUI): we don't want the LSFT to be weak as it would make it useless. + // This also makes LSFT(KC_LEFT_GUI) behave exactly the same as LGUI(KC_LEFT_SHIFT). // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). add_mods(mods); } else { @@ -410,7 +410,7 @@ void process_action(keyrecord_t *record, action_t action) { } else { if (tap_count > 0) { dprint("MODS_TAP: Tap: unregister_code\n"); - if (action.layer_tap.code == KC_CAPS) { + if (action.layer_tap.code == KC_CAPS_LOCK) { wait_ms(TAP_HOLD_CAPS_DELAY); } else { wait_ms(TAP_CODE_DELAY); @@ -609,7 +609,7 @@ void process_action(keyrecord_t *record, action_t action) { } else { if (tap_count > 0) { dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); - if (action.layer_tap.code == KC_CAPS) { + if (action.layer_tap.code == KC_CAPS_LOCK) { wait_ms(TAP_HOLD_CAPS_DELAY); } else { wait_ms(TAP_CODE_DELAY); @@ -786,37 +786,37 @@ void register_code(uint8_t code) { return; } #ifdef LOCKING_SUPPORT_ENABLE - else if (KC_LOCKING_CAPS == code) { + else if (KC_LOCKING_CAPS_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE // Resync: ignore if caps lock already is on if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) return; # endif - add_key(KC_CAPSLOCK); + add_key(KC_CAPS_LOCK); send_keyboard_report(); wait_ms(100); - del_key(KC_CAPSLOCK); + del_key(KC_CAPS_LOCK); send_keyboard_report(); } - else if (KC_LOCKING_NUM == code) { + else if (KC_LOCKING_NUM_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE if (host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) return; # endif - add_key(KC_NUMLOCK); + add_key(KC_NUM_LOCK); send_keyboard_report(); wait_ms(100); - del_key(KC_NUMLOCK); + del_key(KC_NUM_LOCK); send_keyboard_report(); } - else if (KC_LOCKING_SCROLL == code) { + else if (KC_LOCKING_SCROLL_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE if (host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) return; # endif - add_key(KC_SCROLLLOCK); + add_key(KC_SCROLL_LOCK); send_keyboard_report(); wait_ms(100); - del_key(KC_SCROLLLOCK); + del_key(KC_SCROLL_LOCK); send_keyboard_report(); } #endif @@ -882,34 +882,34 @@ void unregister_code(uint8_t code) { return; } #ifdef LOCKING_SUPPORT_ENABLE - else if (KC_LOCKING_CAPS == code) { + else if (KC_LOCKING_CAPS_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE // Resync: ignore if caps lock already is off if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) return; # endif - add_key(KC_CAPSLOCK); + add_key(KC_CAPS_LOCK); send_keyboard_report(); - del_key(KC_CAPSLOCK); + del_key(KC_CAPS_LOCK); send_keyboard_report(); } - else if (KC_LOCKING_NUM == code) { + else if (KC_LOCKING_NUM_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) return; # endif - add_key(KC_NUMLOCK); + add_key(KC_NUM_LOCK); send_keyboard_report(); - del_key(KC_NUMLOCK); + del_key(KC_NUM_LOCK); send_keyboard_report(); } - else if (KC_LOCKING_SCROLL == code) { + else if (KC_LOCKING_SCROLL_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE if (!(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK))) return; # endif - add_key(KC_SCROLLLOCK); + add_key(KC_SCROLL_LOCK); send_keyboard_report(); - del_key(KC_SCROLLLOCK); + del_key(KC_SCROLL_LOCK); send_keyboard_report(); } #endif @@ -952,9 +952,9 @@ void tap_code_delay(uint8_t code, uint16_t delay) { /** \brief Tap a keycode with the default delay. * - * \param code The basic keycode to tap. If `code` is `KC_CAPS`, the delay will be `TAP_HOLD_CAPS_DELAY`, otherwise `TAP_CODE_DELAY`, if defined. + * \param code The basic keycode to tap. If `code` is `KC_CAPS_LOCK`, the delay will be `TAP_HOLD_CAPS_DELAY`, otherwise `TAP_CODE_DELAY`, if defined. */ -void tap_code(uint8_t code) { tap_code_delay(code, code == KC_CAPS ? TAP_HOLD_CAPS_DELAY : TAP_CODE_DELAY); } +void tap_code(uint8_t code) { tap_code_delay(code, code == KC_CAPS_LOCK ? TAP_HOLD_CAPS_DELAY : TAP_CODE_DELAY); } /** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately. * @@ -1078,7 +1078,7 @@ bool is_tap_action(action_t action) { case ACT_LAYER_TAP: case ACT_LAYER_TAP_EXT: switch (action.layer_tap.code) { - case KC_NO ... KC_RGUI: + case KC_NO ... KC_RIGHT_GUI: case OP_TAP_TOGGLE: case OP_ONESHOT: return true; @@ -1086,7 +1086,7 @@ bool is_tap_action(action_t action) { return false; case ACT_SWAP_HANDS: switch (action.swap.code) { - case KC_NO ... KC_RGUI: + case KC_NO ... KC_RIGHT_GUI: case OP_SH_TAP_TOGGLE: return true; } diff --git a/quantum/keycode.h b/quantum/keycode.h index 8facabd818..38a29b439b 100644 --- a/quantum/keycode.h +++ b/quantum/keycode.h @@ -29,7 +29,7 @@ along with this program. If not, see . #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_LCTRL <= (code) && (code) <= KC_RGUI) +#define IS_MOD(code) (KC_LEFT_CTRL <= (code) && (code) <= KC_RIGHT_GUI) #define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF)) #define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE) @@ -46,10 +46,10 @@ along with this program. If not, see . #define MOD_BIT(code) (1 << MOD_INDEX(code)) #define MOD_INDEX(code) ((code)&0x07) -#define MOD_MASK_CTRL (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) -#define MOD_MASK_SHIFT (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) -#define MOD_MASK_ALT (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) -#define MOD_MASK_GUI (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) +#define MOD_MASK_CTRL (MOD_BIT(KC_LEFT_CTRL) | MOD_BIT(KC_RIGHT_CTRL)) +#define MOD_MASK_SHIFT (MOD_BIT(KC_LEFT_SHIFT) | MOD_BIT(KC_RIGHT_SHIFT)) +#define MOD_MASK_ALT (MOD_BIT(KC_LEFT_ALT) | MOD_BIT(KC_RIGHT_ALT)) +#define MOD_MASK_GUI (MOD_BIT(KC_LEFT_GUI) | MOD_BIT(KC_RIGHT_GUI)) #define MOD_MASK_CS (MOD_MASK_CTRL | MOD_MASK_SHIFT) #define MOD_MASK_CA (MOD_MASK_CTRL | MOD_MASK_ALT) #define MOD_MASK_CG (MOD_MASK_CTRL | MOD_MASK_GUI) @@ -67,6 +67,8 @@ along with this program. If not, see . #define FN_MIN KC_FN0 #define FN_MAX KC_FN31 +// clang-format off + /* * Short names for ease of definition of keymap */ @@ -75,47 +77,55 @@ along with this program. If not, see . #define KC_TRNS KC_TRANSPARENT /* Punctuation */ -#define KC_ENT KC_ENTER -#define KC_ESC KC_ESCAPE -#define KC_BSPC KC_BSPACE -#define KC_SPC KC_SPACE +#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_LBRACKET -#define KC_RBRC KC_RBRACKET -#define KC_BSLS KC_BSLASH +#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_SCOLON +#define KC_SCLN KC_SEMICOLON #define KC_QUOT KC_QUOTE -#define KC_GRV KC_GRAVE +#define KC_GRV KC_GRAVE #define KC_COMM KC_COMMA #define KC_SLSH KC_SLASH -#define KC_NUBS KC_NONUS_BSLASH +#define KC_NUBS KC_NONUS_BACKSLASH /* Lock Keys */ -#define KC_CLCK KC_CAPSLOCK -#define KC_CAPS KC_CAPSLOCK -#define KC_SLCK KC_SCROLLLOCK -#define KC_NLCK KC_NUMLOCK -#define KC_LCAP KC_LOCKING_CAPS -#define KC_LNUM KC_LOCKING_NUM -#define KC_LSCR KC_LOCKING_SCROLL +#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_PSCREEN +#define KC_PSCR KC_PRINT_SCREEN #define KC_PAUS KC_PAUSE -#define KC_BRK KC_PAUSE -#define KC_INS KC_INSERT -#define KC_DEL KC_DELETE -#define KC_PGDN KC_PGDOWN +#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_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_ALT_ERASE -#define KC_CLR KC_CLEAR +#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 @@ -123,47 +133,59 @@ along with this program. If not, see . #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_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 -/* Japanese specific */ -#define KC_ZKHK KC_GRAVE -#define KC_RO KC_INT1 -#define KC_KANA KC_INT2 -#define KC_JYEN KC_INT3 -#define KC_HENK KC_INT4 -#define KC_MHEN KC_INT5 - -/* Korean specific */ -#define KC_HAEN KC_LANG1 -#define KC_HANJ KC_LANG2 +/* 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_LCTRL -#define KC_LSFT KC_LSHIFT -#define KC_LOPT KC_LALT -#define KC_LCMD KC_LGUI -#define KC_LWIN KC_LGUI -#define KC_RCTL KC_RCTRL -#define KC_RSFT KC_RSHIFT -#define KC_ALGR KC_RALT -#define KC_ROPT KC_RALT -#define KC_RCMD KC_RGUI -#define KC_RWIN KC_RGUI +#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_PWR KC_SYSTEM_POWER #define KC_SLEP KC_SYSTEM_SLEEP #define KC_WAKE KC_SYSTEM_WAKE @@ -193,7 +215,7 @@ along with this program. If not, see . /* System Specific */ #define KC_BRMU KC_PAUSE -#define KC_BRMD KC_SCROLLLOCK +#define KC_BRMD KC_SCROLL_LOCK /* Mouse Keys */ #define KC_MS_U KC_MS_UP @@ -216,6 +238,8 @@ along with this program. If not, see . #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, @@ -260,22 +284,22 @@ enum hid_keyboard_keypad_usage { KC_0, KC_ENTER, KC_ESCAPE, - KC_BSPACE, + KC_BACKSPACE, KC_TAB, KC_SPACE, KC_MINUS, KC_EQUAL, - KC_LBRACKET, - KC_RBRACKET, // 0x30 - KC_BSLASH, + KC_LEFT_BRACKET, + KC_RIGHT_BRACKET, // 0x30 + KC_BACKSLASH, KC_NONUS_HASH, - KC_SCOLON, + KC_SEMICOLON, KC_QUOTE, KC_GRAVE, KC_COMMA, KC_DOT, KC_SLASH, - KC_CAPSLOCK, + KC_CAPS_LOCK, KC_F1, KC_F2, KC_F3, @@ -288,20 +312,20 @@ enum hid_keyboard_keypad_usage { KC_F10, KC_F11, KC_F12, - KC_PSCREEN, - KC_SCROLLLOCK, + KC_PRINT_SCREEN, + KC_SCROLL_LOCK, KC_PAUSE, KC_INSERT, KC_HOME, - KC_PGUP, + KC_PAGE_UP, KC_DELETE, KC_END, - KC_PGDOWN, + KC_PAGE_DOWN, KC_RIGHT, KC_LEFT, // 0x50 KC_DOWN, KC_UP, - KC_NUMLOCK, + KC_NUM_LOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, @@ -318,9 +342,9 @@ enum hid_keyboard_keypad_usage { KC_KP_9, KC_KP_0, KC_KP_DOT, - KC_NONUS_BSLASH, + KC_NONUS_BACKSLASH, KC_APPLICATION, - KC_POWER, + KC_KB_POWER, KC_KP_EQUAL, KC_F13, KC_F14, @@ -345,34 +369,34 @@ enum hid_keyboard_keypad_usage { KC_COPY, KC_PASTE, KC_FIND, - KC__MUTE, - KC__VOLUP, // 0x80 - KC__VOLDOWN, - KC_LOCKING_CAPS, - KC_LOCKING_NUM, - KC_LOCKING_SCROLL, + 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_INT1, - KC_INT2, - KC_INT3, - KC_INT4, - KC_INT5, - KC_INT6, - KC_INT7, - KC_INT8, - KC_INT9, - KC_LANG1, // 0x90 - KC_LANG2, - KC_LANG3, - KC_LANG4, - KC_LANG5, - KC_LANG6, - KC_LANG7, - KC_LANG8, - KC_LANG9, - KC_ALT_ERASE, - KC_SYSREQ, + 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, @@ -397,12 +421,12 @@ enum hid_keyboard_keypad_usage { KC_DECIMAL_SEPARATOR, KC_CURRENCY_UNIT, KC_CURRENCY_SUB_UNIT, - KC_KP_LPAREN, - KC_KP_RPAREN, - KC_KP_LCBRACKET, - KC_KP_RCBRACKET, + KC_KP_LEFT_PARENTHESIS, + KC_KP_RIGHT_PARENTHESIS, + KC_KP_LEFT_BRACE, + KC_KP_RIGHT_BRACE, KC_KP_TAB, - KC_KP_BSPACE, + KC_KP_BACKSPACE, KC_KP_A, KC_KP_B, KC_KP_C, @@ -411,17 +435,17 @@ enum hid_keyboard_keypad_usage { KC_KP_F, KC_KP_XOR, KC_KP_HAT, - KC_KP_PERC, - KC_KP_LT, - KC_KP_GT, + KC_KP_PERCENT, + KC_KP_LESS_THAN, + KC_KP_GREATER_THAN, KC_KP_AND, - KC_KP_LAZYAND, + KC_KP_LAZY_AND, KC_KP_OR, - KC_KP_LAZYOR, + KC_KP_LAZY_OR, KC_KP_COLON, KC_KP_HASH, KC_KP_SPACE, - KC_KP_ATMARK, + KC_KP_AT, KC_KP_EXCLAMATION, KC_KP_MEM_STORE, //0xD0 KC_KP_MEM_RECALL, @@ -440,14 +464,14 @@ enum hid_keyboard_keypad_usage { #endif /* Modifiers */ - KC_LCTRL = 0xE0, - KC_LSHIFT, - KC_LALT, - KC_LGUI, - KC_RCTRL, - KC_RSHIFT, - KC_RALT, - KC_RGUI + 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. * @@ -558,3 +582,5 @@ enum mouse_keys { KC_MS_ACCEL1, KC_MS_ACCEL2 // 0xFF }; + +#include "keycode_legacy.h" diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c index f340905eab..dd2a17e242 100644 --- a/quantum/keycode_config.c +++ b/quantum/keycode_config.c @@ -25,89 +25,89 @@ extern keymap_config_t keymap_config; */ uint16_t keycode_config(uint16_t keycode) { switch (keycode) { - case KC_CAPSLOCK: - case KC_LOCKING_CAPS: + case KC_CAPS_LOCK: + case KC_LOCKING_CAPS_LOCK: if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) { - return KC_LCTL; + return KC_LEFT_CTRL; } return keycode; - case KC_LCTL: + case KC_LEFT_CTRL: if (keymap_config.swap_control_capslock) { - return KC_CAPSLOCK; + return KC_CAPS_LOCK; } if (keymap_config.swap_lctl_lgui) { if (keymap_config.no_gui) { return KC_NO; } - return KC_LGUI; + return KC_LEFT_GUI; } - return KC_LCTL; - case KC_LALT: + return KC_LEFT_CTRL; + case KC_LEFT_ALT: if (keymap_config.swap_lalt_lgui) { if (keymap_config.no_gui) { return KC_NO; } - return KC_LGUI; + return KC_LEFT_GUI; } - return KC_LALT; - case KC_LGUI: + return KC_LEFT_ALT; + case KC_LEFT_GUI: if (keymap_config.swap_lalt_lgui) { - return KC_LALT; + return KC_LEFT_ALT; } if (keymap_config.swap_lctl_lgui) { - return KC_LCTRL; + return KC_LEFT_CTRL; } if (keymap_config.no_gui) { return KC_NO; } - return KC_LGUI; - case KC_RCTL: + return KC_LEFT_GUI; + case KC_RIGHT_CTRL: if (keymap_config.swap_rctl_rgui) { if (keymap_config.no_gui) { return KC_NO; } - return KC_RGUI; + return KC_RIGHT_GUI; } - return KC_RCTL; - case KC_RALT: + return KC_RIGHT_CTRL; + case KC_RIGHT_ALT: if (keymap_config.swap_ralt_rgui) { if (keymap_config.no_gui) { return KC_NO; } - return KC_RGUI; + return KC_RIGHT_GUI; } - return KC_RALT; - case KC_RGUI: + return KC_RIGHT_ALT; + case KC_RIGHT_GUI: if (keymap_config.swap_ralt_rgui) { - return KC_RALT; + return KC_RIGHT_ALT; } if (keymap_config.swap_rctl_rgui) { - return KC_RCTL; + return KC_RIGHT_CTRL; } if (keymap_config.no_gui) { return KC_NO; } - return KC_RGUI; + return KC_RIGHT_GUI; case KC_GRAVE: if (keymap_config.swap_grave_esc) { - return KC_ESC; + return KC_ESCAPE; } return KC_GRAVE; - case KC_ESC: + case KC_ESCAPE: if (keymap_config.swap_grave_esc) { return KC_GRAVE; } - return KC_ESC; - case KC_BSLASH: + return KC_ESCAPE; + case KC_BACKSLASH: if (keymap_config.swap_backslash_backspace) { - return KC_BSPACE; + return KC_BACKSPACE; } - return KC_BSLASH; - case KC_BSPACE: + return KC_BACKSLASH; + case KC_BACKSPACE: if (keymap_config.swap_backslash_backspace) { - return KC_BSLASH; + return KC_BACKSLASH; } - return KC_BSPACE; + return KC_BACKSPACE; default: return keycode; } diff --git a/quantum/keycode_legacy.h b/quantum/keycode_legacy.h new file mode 100644 index 0000000000..0317a05534 --- /dev/null +++ b/quantum/keycode_legacy.h @@ -0,0 +1,53 @@ +#pragma once + +// clang-format off + +// These keycode names have been deprecated + +#define KC_BSPACE KC_BACKSPACE +#define KC_LBRACKET KC_LEFT_BRACKET +#define KC_RBRACKET KC_RIGHT_BRACKET +#define KC_BSLASH KC_BACKSLASH +#define KC_SCOLON KC_SEMICOLON +#define KC_CAPSLOCK KC_CAPS_LOCK +#define KC_PSCREEN KC_PRINT_SCREEN +#define KC_SCROLLLOCK KC_SCROLL_LOCK +#define KC_PGDOWN KC_PAGE_DOWN +#define KC_NUMLOCK KC_NUM_LOCK +#define KC_NONUS_BSLASH KC_NONUS_BACKSLASH +#define KC_POWER KC_KB_POWER +#define KC__MUTE KC_KB_MUTE +#define KC__VOLUP KC_KB_VOLUME_UP +#define KC__VOLDOWN KC_KB_VOLUME_DOWN +#define KC_LOCKING_CAPS KC_LOCKING_CAPS_LOCK +#define KC_LOCKING_NUM KC_LOCKING_NUM_LOCK +#define KC_LOCKING_SCROLL KC_LOCKING_SCROLL_LOCK +#define KC_LANG1 KC_LANGUAGE_1 +#define KC_LANG2 KC_LANGUAGE_2 +#define KC_LANG3 KC_LANGUAGE_3 +#define KC_LANG4 KC_LANGUAGE_4 +#define KC_LANG5 KC_LANGUAGE_5 +#define KC_LANG6 KC_LANGUAGE_6 +#define KC_LANG7 KC_LANGUAGE_7 +#define KC_LANG8 KC_LANGUAGE_8 +#define KC_LANG9 KC_LANGUAGE_9 +#define KC_ALT_ERASE KC_ALTERNATE_ERASE +#define KC_SYSREQ KC_SYSTEM_REQUEST + +#define KC_LCTRL KC_LEFT_CTRL +#define KC_LSHIFT KC_LEFT_SHIFT +#define KC_RCTRL KC_RIGHT_CTRL +#define KC_RSHIFT KC_RIGHT_SHIFT + +#define KC_ZKHK KC_GRAVE +#define KC_RO KC_INTERNATIONAL_1 +#define KC_KANA KC_INTERNATIONAL_2 +#define KC_JYEN KC_INTERNATIONAL_3 +#define KC_HENK KC_INTERNATIONAL_4 +#define KC_MHEN KC_INTERNATIONAL_5 +#define KC_HAEN KC_LANGUAGE_1 +#define KC_HANJ KC_LANGUAGE_2 + +#define KC_CLCK KC_CAPS_LOCK +#define KC_SLCK KC_SCROLL_LOCK +#define KC_NLCK KC_NUM_LOCK diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 780c71ab9b..5007f15f11 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -56,7 +56,7 @@ action_t action_for_keycode(uint16_t keycode) { switch (keycode) { case KC_A ... KC_EXSEL: - case KC_LCTRL ... KC_RGUI: + case KC_LEFT_CTRL ... KC_RIGHT_GUI: action.code = ACTION_KEY(keycode); break; #ifdef EXTRAKEY_ENABLE @@ -72,7 +72,7 @@ action_t action_for_keycode(uint16_t keycode) { action.code = ACTION_MOUSEKEY(keycode); break; #endif - case KC_TRNS: + case KC_TRANSPARENT: action.code = ACTION_TRANSPARENT; break; case QK_MODS ... QK_MODS_MAX:; diff --git a/quantum/keymap_extras/keymap_korean.h b/quantum/keymap_extras/keymap_korean.h index 23d235ef09..74be122dad 100644 --- a/quantum/keymap_extras/keymap_korean.h +++ b/quantum/keymap_extras/keymap_korean.h @@ -85,8 +85,8 @@ #define KR_DOT KC_DOT // . #define KR_SLSH KC_SLSH // / // Row 5 -#define KR_HANJ KC_LANG2 // Hanja (한자) -#define KR_HAEN KC_LANG1 // Han ↔ Yeong (한 ↔ 영) +#define KR_HANJ KC_LNG2 // Hanja (한자) +#define KR_HAEN KC_LNG1 // Han ↔ Yeong (한 ↔ 영) /* Shifted symbols * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index cc3a974ea8..02af5174f7 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -67,7 +67,7 @@ static bool autoshift_press(uint16_t keycode, uint16_t now, keyrecord_t *record) register_code(autoshift_lastkey); } else { // Simulate pressing the shift key. - add_weak_mods(MOD_BIT(KC_LSFT)); + add_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); register_code(autoshift_lastkey); } return false; @@ -108,7 +108,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) { autoshift_flags.lastshifted = false; } else { // Simulate pressing the shift key. - add_weak_mods(MOD_BIT(KC_LSFT)); + add_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); register_code(autoshift_lastkey); autoshift_flags.lastshifted = true; # if defined(AUTO_SHIFT_REPEAT) && !defined(AUTO_SHIFT_NO_AUTO_REPEAT) @@ -123,7 +123,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) { wait_ms(TAP_CODE_DELAY); # endif unregister_code(autoshift_lastkey); - del_weak_mods(MOD_BIT(KC_LSFT)); + del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); } else { // Release after keyrepeat. unregister_code(keycode); @@ -131,7 +131,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) { // This will only fire when the key was the last auto-shiftable // pressed. That prevents aaaaBBBB then releasing a from unshifting // later Bs (if B wasn't auto-shiftable). - del_weak_mods(MOD_BIT(KC_LSFT)); + del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); } } send_keyboard_report(); // del_weak_mods doesn't send one. @@ -157,14 +157,14 @@ void autoshift_matrix_scan(void) { void autoshift_toggle(void) { autoshift_flags.enabled = !autoshift_flags.enabled; - del_weak_mods(MOD_BIT(KC_LSFT)); + del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); } void autoshift_enable(void) { autoshift_flags.enabled = true; } void autoshift_disable(void) { autoshift_flags.enabled = false; - del_weak_mods(MOD_BIT(KC_LSFT)); + del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); } # ifndef AUTO_SHIFT_NO_SETUP @@ -195,7 +195,7 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { autoshift_end(KC_NO, now, false); } // For pressing another key while keyrepeating shifted autoshift. - del_weak_mods(MOD_BIT(KC_LSFT)); + del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); switch (keycode) { case KC_ASTG: @@ -244,7 +244,7 @@ __attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *r # ifndef NO_AUTO_SHIFT_SPECIAL case KC_TAB: case KC_MINUS ... KC_SLASH: - case KC_NONUS_BSLASH: + case KC_NONUS_BACKSLASH: # endif return true; } diff --git a/quantum/process_keycode/process_haptic.c b/quantum/process_keycode/process_haptic.c index 466c8e5543..85b2ffcddd 100644 --- a/quantum/process_keycode/process_haptic.c +++ b/quantum/process_keycode/process_haptic.c @@ -31,7 +31,7 @@ __attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: if (record->tap.count == 0) return false; break; - case KC_LCTRL ... KC_RGUI: + case KC_LEFT_CTRL ... KC_RIGHT_GUI: case QK_MOMENTARY ... QK_MOMENTARY_MAX: case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: #endif @@ -44,34 +44,34 @@ __attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t #ifdef NO_HAPTIC_PUNCTUATION case KC_ENTER: case KC_ESCAPE: - case KC_BSPACE: + case KC_BACKSPACE: case KC_SPACE: case KC_MINUS: case KC_EQUAL: - case KC_LBRACKET: - case KC_RBRACKET: - case KC_BSLASH: + case KC_LEFT_BRACKET: + case KC_RIGHT_BRACKET: + case KC_BACKSLASH: case KC_NONUS_HASH: - case KC_SCOLON: + case KC_SEMICOLON: case KC_QUOTE: case KC_GRAVE: case KC_COMMA: case KC_SLASH: case KC_DOT: - case KC_NONUS_BSLASH: + case KC_NONUS_BACKSLASH: #endif #ifdef NO_HAPTIC_LOCKKEYS - case KC_CAPSLOCK: - case KC_SCROLLLOCK: - case KC_NUMLOCK: + case KC_CAPS_LOCK: + case KC_SCROLL_LOCK: + case KC_NUM_LOCK: #endif #ifdef NO_HAPTIC_NAV - case KC_PSCREEN: + case KC_PRINT_SCREEN: case KC_PAUSE: case KC_INSERT: case KC_DELETE: - case KC_PGDOWN: - case KC_PGUP: + case KC_PAGE_DOWN: + case KC_PAGE_UP: case KC_LEFT: case KC_UP: case KC_RIGHT: diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 2beccbd8f9..6822c5e289 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -146,7 +146,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { if (music_activated || midi_activated) { if (record->event.pressed) { - if (keycode == KC_LCTL) { // Start recording + if (keycode == KC_LEFT_CTRL) { // Start recording music_all_notes_off(); music_sequence_recording = true; music_sequence_recorded = false; @@ -155,7 +155,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { return false; } - if (keycode == KC_LALT) { // Stop recording/playing + if (keycode == KC_LEFT_ALT) { // Stop recording/playing music_all_notes_off(); if (music_sequence_recording) { // was recording music_sequence_recorded = true; @@ -165,7 +165,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { return false; } - if (keycode == KC_LGUI && music_sequence_recorded) { // Start playing + if (keycode == KC_LEFT_GUI && music_sequence_recorded) { // Start playing music_all_notes_off(); music_sequence_recording = false; music_sequence_playing = true; diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c index 7c5e4169a6..82528cc680 100644 --- a/quantum/process_keycode/process_printer.c +++ b/quantum/process_keycode/process_printer.c @@ -31,7 +31,7 @@ uint8_t shifted_numbers[10] = {0x21, 0x40, 0x23, 0x24, 0x25, 0x5E, 0x26, 0x2A, 0 // uint8_t keycode_to_ascii[0xFF][2]; -// keycode_to_ascii[KC_MINS] = {0x2D, 0x5F}; +// keycode_to_ascii[KC_MINUS] = {0x2D, 0x5F}; void print_char(char c) { USB_Disable(); @@ -90,8 +90,8 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { case KC_PIPE: case KC_TILD: keycode &= 0xFF; - case KC_LSFT: - case KC_RSFT: + case KC_LEFT_SHIFT: + case KC_RIGHT_SHIFT: if (record->event.pressed) { character_shift++; } else { @@ -107,13 +107,13 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { print_box_string("This is a line of text!"); } return false; - case KC_ESC: + case KC_ESCAPE: if (record->event.pressed) { print_char(0x1B); } return false; break; - case KC_SPC: + case KC_SPACE: if (record->event.pressed) { print_char(0x20); } @@ -139,7 +139,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_ENT: + case KC_ENTER: if (record->event.pressed) { if (character_shift) { print_char(0x0C); @@ -149,7 +149,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_BSPC: + case KC_BACKSPACE: if (record->event.pressed) { if (character_shift) { print_char(0x18); @@ -169,7 +169,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_COMM: + case KC_COMMA: if (record->event.pressed) { if (character_shift) { print_char(0x3C); @@ -179,7 +179,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_SLSH: + case KC_SLASH: if (record->event.pressed) { if (character_shift) { print_char(0x3F); @@ -189,7 +189,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_QUOT: + case KC_QUOTE: if (record->event.pressed) { if (character_shift) { print_char(0x22); @@ -199,7 +199,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_GRV: + case KC_GRAVE: if (record->event.pressed) { if (character_shift) { print_char(0x7E); @@ -209,7 +209,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_MINS: + case KC_MINUS: if (record->event.pressed) { if (character_shift) { print_char(0x5F); @@ -219,7 +219,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_EQL: + case KC_EQUAL: if (record->event.pressed) { if (character_shift) { print_char(0x2B); @@ -229,7 +229,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_LBRC: + case KC_LEFT_BRACKET: if (record->event.pressed) { if (character_shift) { print_char(0x7B); @@ -239,7 +239,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_RBRC: + case KC_RIGHT_BRACKET: if (record->event.pressed) { if (character_shift) { print_char(0x7D); @@ -249,7 +249,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_BSLS: + case KC_BACKSLASH: if (record->event.pressed) { if (character_shift) { print_char(0x7C); diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c index e482d82591..6c91bd27ef 100644 --- a/quantum/process_keycode/process_printer_bb.c +++ b/quantum/process_keycode/process_printer_bb.c @@ -45,7 +45,7 @@ uint8_t shifted_numbers[10] = {0x21, 0x40, 0x23, 0x24, 0x25, 0x5E, 0x26, 0x2A, 0 // uint8_t keycode_to_ascii[0xFF][2]; -// keycode_to_ascii[KC_MINS] = {0x2D, 0x5F}; +// keycode_to_ascii[KC_MINUS] = {0x2D, 0x5F}; void print_char(char c) { uint8_t b = 8; @@ -84,8 +84,8 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { case KC_PIPE: case KC_TILD: keycode &= 0xFF; - case KC_LSFT: - case KC_RSFT: + case KC_LEFT_SHIFT: + case KC_RIGHT_SHIFT: if (record->event.pressed) { character_shift++; } else { @@ -101,13 +101,13 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { print_string("This is a line of text!\n\n\n"); } return false; - case KC_ESC: + case KC_ESCAPE: if (record->event.pressed) { print_char(0x1B); } return false; break; - case KC_SPC: + case KC_SPACE: if (record->event.pressed) { print_char(0x20); } @@ -133,7 +133,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_ENT: + case KC_ENTER: if (record->event.pressed) { if (character_shift) { print_char(0x0C); @@ -143,7 +143,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_BSPC: + case KC_BACKSPACE: if (record->event.pressed) { if (character_shift) { print_char(0x18); @@ -163,7 +163,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_COMM: + case KC_COMMA: if (record->event.pressed) { if (character_shift) { print_char(0x3C); @@ -173,7 +173,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_SLSH: + case KC_SLASH: if (record->event.pressed) { if (character_shift) { print_char(0x3F); @@ -183,7 +183,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_QUOT: + case KC_QUOTE: if (record->event.pressed) { if (character_shift) { print_char(0x22); @@ -193,7 +193,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_GRV: + case KC_GRAVE: if (record->event.pressed) { if (character_shift) { print_char(0x7E); @@ -203,7 +203,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_MINS: + case KC_MINUS: if (record->event.pressed) { if (character_shift) { print_char(0x5F); @@ -213,7 +213,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_EQL: + case KC_EQUAL: if (record->event.pressed) { if (character_shift) { print_char(0x2B); @@ -223,7 +223,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_LBRC: + case KC_LEFT_BRACKET: if (record->event.pressed) { if (character_shift) { print_char(0x7B); @@ -233,7 +233,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_RBRC: + case KC_RIGHT_BRACKET: if (record->event.pressed) { if (character_shift) { print_char(0x7D); @@ -243,7 +243,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_BSLS: + case KC_BACKSLASH: if (record->event.pressed) { if (character_shift) { print_char(0x7C); diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c index f99db2a87b..46b2648c35 100644 --- a/quantum/process_keycode/process_space_cadet.c +++ b/quantum/process_keycode/process_space_cadet.c @@ -27,53 +27,53 @@ // Shift / Enter setup #ifndef SFTENT_KEY -# define SFTENT_KEY KC_ENT +# define SFTENT_KEY KC_ENTER #endif #ifdef DISABLE_SPACE_CADET_MODIFIER # ifndef LSPO_MOD -# define LSPO_MOD KC_TRNS +# define LSPO_MOD KC_TRANSPARENT # endif # ifndef RSPC_MOD -# define RSPC_MOD KC_TRNS +# define RSPC_MOD KC_TRANSPARENT # endif #else # ifndef LSPO_MOD -# define LSPO_MOD KC_LSFT +# define LSPO_MOD KC_LEFT_SHIFT # endif # ifndef RSPC_MOD -# define RSPC_MOD KC_RSFT +# define RSPC_MOD KC_RIGHT_SHIFT # endif #endif // ********************************************************** // Shift / paren setup #ifndef LSPO_KEYS -# define LSPO_KEYS KC_LSFT, LSPO_MOD, LSPO_KEY +# define LSPO_KEYS KC_LEFT_SHIFT, LSPO_MOD, LSPO_KEY #endif #ifndef RSPC_KEYS -# define RSPC_KEYS KC_RSFT, RSPC_MOD, RSPC_KEY +# define RSPC_KEYS KC_RIGHT_SHIFT, RSPC_MOD, RSPC_KEY #endif // Control / paren setup #ifndef LCPO_KEYS -# define LCPO_KEYS KC_LCTL, KC_LSFT, KC_9 +# define LCPO_KEYS KC_LEFT_CTRL, KC_LEFT_SHIFT, KC_9 #endif #ifndef RCPC_KEYS -# define RCPC_KEYS KC_RCTL, KC_RSFT, KC_0 +# define RCPC_KEYS KC_RIGHT_CTRL, KC_RIGHT_SHIFT, KC_0 #endif // Alt / paren setup #ifndef LAPO_KEYS -# define LAPO_KEYS KC_LALT, KC_LSFT, KC_9 +# define LAPO_KEYS KC_LEFT_ALT, KC_LEFT_SHIFT, KC_9 #endif #ifndef RAPC_KEYS -# define RAPC_KEYS KC_RALT, KC_RSFT, KC_0 +# define RAPC_KEYS KC_RIGHT_ALT, KC_RIGHT_SHIFT, KC_0 #endif // Shift / Enter setup #ifndef SFTENT_KEYS -# define SFTENT_KEYS KC_RSFT, KC_TRNS, SFTENT_KEY +# define SFTENT_KEYS KC_RIGHT_SHIFT, KC_TRANSPARENT, SFTENT_KEY #endif static uint8_t sc_last = 0; diff --git a/quantum/process_keycode/process_terminal.c b/quantum/process_keycode/process_terminal.c index 7d1eefa9ed..a059f3a521 100644 --- a/quantum/process_keycode/process_terminal.c +++ b/quantum/process_keycode/process_terminal.c @@ -257,12 +257,12 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { process_terminal_command(); return false; break; - case KC_ESC: + case KC_ESCAPE: SEND_STRING("\n"); enable_terminal(); return false; break; - case KC_BSPC: + case KC_BACKSPACE: str_len = strlen(buffer); if (str_len > 0) { buffer[str_len - 1] = 0; @@ -284,7 +284,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { str_len = strlen(buffer); for (int i = 0; i < str_len; ++i) { send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already - // process_terminal(KC_BSPC,record); + // process_terminal(KC_BACKSPACE,record); } strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 80); @@ -299,7 +299,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { str_len = strlen(buffer); for (int i = 0; i < str_len; ++i) { send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already - // process_terminal(KC_BSPC,record); + // process_terminal(KC_BACKSPACE,record); } strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 79); @@ -311,7 +311,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { default: if (keycode <= 58) { char_to_add = 0; - if (get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) { + if (get_mods() & (MOD_BIT(KC_LEFT_SHIFT) | MOD_BIT(KC_RIGHT_SHIFT))) { char_to_add = shifted_keycode_to_ascii_lut[keycode]; } else if (get_mods() == 0) { char_to_add = keycode_to_ascii_lut[keycode]; diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 12b0aba9bf..d084d2b66c 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -46,7 +46,7 @@ static bool is_uni_seq(char *seq) { return false; } } - return qk_ucis_state.codes[i] == KC_ENT || qk_ucis_state.codes[i] == KC_SPC; + return qk_ucis_state.codes[i] == KC_ENTER || qk_ucis_state.codes[i] == KC_SPACE; } __attribute__((weak)) void qk_ucis_symbol_fallback(void) { @@ -72,7 +72,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { return true; } - bool special = keycode == KC_SPC || keycode == KC_ENT || keycode == KC_ESC || keycode == KC_BSPC; + bool special = keycode == KC_SPACE || keycode == KC_ENTER || keycode == KC_ESCAPE || keycode == KC_BACKSPACE; if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) { return false; } @@ -81,7 +81,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { qk_ucis_state.count++; switch (keycode) { - case KC_BSPC: + case KC_BACKSPACE: if (qk_ucis_state.count >= 2) { qk_ucis_state.count -= 2; return true; @@ -90,16 +90,16 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { return false; } - case KC_SPC: - case KC_ENT: - case KC_ESC: + case KC_SPACE: + case KC_ENTER: + case KC_ESCAPE: for (uint8_t i = 0; i < qk_ucis_state.count; i++) { - register_code(KC_BSPC); - unregister_code(KC_BSPC); + register_code(KC_BACKSPACE); + unregister_code(KC_BACKSPACE); wait_ms(UNICODE_TYPE_DELAY); } - if (keycode == KC_ESC) { + if (keycode == KC_ESCAPE) { qk_ucis_state.in_progress = false; qk_ucis_cancel(); return false; diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 7853c22c5d..9c82571c7d 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -87,7 +87,7 @@ __attribute__((weak)) void unicode_input_start(void) { // UNICODE_KEY_LNX (which is usually Ctrl-Shift-U) might not work // correctly in the shifted case. if (unicode_config.input_mode == UC_LNX && unicode_saved_caps_lock) { - tap_code(KC_CAPSLOCK); + tap_code(KC_CAPS_LOCK); } unicode_saved_mods = get_mods(); // Save current mods @@ -103,9 +103,9 @@ __attribute__((weak)) void unicode_input_start(void) { case UC_WIN: // For increased reliability, use numpad keys for inputting digits if (!unicode_saved_num_lock) { - tap_code(KC_NUMLOCK); + tap_code(KC_NUM_LOCK); } - register_code(KC_LALT); + register_code(KC_LEFT_ALT); tap_code(KC_KP_PLUS); break; case UC_WINC: @@ -125,13 +125,13 @@ __attribute__((weak)) void unicode_input_finish(void) { case UC_LNX: tap_code(KC_SPACE); if (unicode_saved_caps_lock) { - tap_code(KC_CAPSLOCK); + tap_code(KC_CAPS_LOCK); } break; case UC_WIN: - unregister_code(KC_LALT); + unregister_code(KC_LEFT_ALT); if (!unicode_saved_num_lock) { - tap_code(KC_NUMLOCK); + tap_code(KC_NUM_LOCK); } break; case UC_WINC: @@ -150,16 +150,16 @@ __attribute__((weak)) void unicode_input_cancel(void) { case UC_LNX: tap_code(KC_ESCAPE); if (unicode_saved_caps_lock) { - tap_code(KC_CAPSLOCK); + tap_code(KC_CAPS_LOCK); } break; case UC_WINC: tap_code(KC_ESCAPE); break; case UC_WIN: - unregister_code(KC_LALT); + unregister_code(KC_LEFT_ALT); if (!unicode_saved_num_lock) { - tap_code(KC_NUMLOCK); + tap_code(KC_NUM_LOCK); } break; } diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index c10e171ec3..72defb445e 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -24,13 +24,13 @@ // Keycodes used for starting Unicode input on different platforms #ifndef UNICODE_KEY_MAC -# define UNICODE_KEY_MAC KC_LALT +# define UNICODE_KEY_MAC KC_LEFT_ALT #endif #ifndef UNICODE_KEY_LNX # define UNICODE_KEY_LNX LCTL(LSFT(KC_U)) #endif #ifndef UNICODE_KEY_WINC -# define UNICODE_KEY_WINC KC_RALT +# define UNICODE_KEY_WINC KC_RIGHT_ALT #endif // Comma-delimited, ordered list of input modes selected for use (e.g. in cycle) diff --git a/quantum/quantum.c b/quantum/quantum.c index ac8857df85..0eca329f08 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -62,15 +62,15 @@ uint8_t extract_mod_bits(uint16_t code) { uint8_t mods_to_send = 0; if (code & QK_RMODS_MIN) { // Right mod flag is set - if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RCTL); - if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RSFT); - if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RALT); - if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_RGUI); + if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RIGHT_CTRL); + if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RIGHT_SHIFT); + if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RIGHT_ALT); + if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_RIGHT_GUI); } else { - if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_LCTL); - if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_LSFT); - if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_LALT); - if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LGUI); + if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_LEFT_CTRL); + if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_LEFT_SHIFT); + if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_LEFT_ALT); + if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LEFT_GUI); } return mods_to_send; diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 373a31a00d..cde97074d3 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -19,7 +19,7 @@ #include "sequencer.h" // Fillers to make layering more clear -#define _______ KC_TRNS +#define _______ KC_TRANSPARENT #define XXXXXXX KC_NO enum quantum_keycodes { @@ -599,69 +599,67 @@ enum quantum_keycodes { #define MOD_MEH 0x7 // US ANSI shifted keycode aliases -#define KC_TILD LSFT(KC_GRV) // ~ -#define KC_TILDE KC_TILD +#define KC_TILDE LSFT(KC_GRAVE) // ~ +#define KC_TILD KC_TILDE -#define KC_EXLM LSFT(KC_1) // ! -#define KC_EXCLAIM KC_EXLM +#define KC_EXCLAIM LSFT(KC_1) // ! +#define KC_EXLM KC_EXCLAIM #define KC_AT LSFT(KC_2) // @ #define KC_HASH LSFT(KC_3) // # -#define KC_DLR LSFT(KC_4) // $ -#define KC_DOLLAR KC_DLR +#define KC_DOLLAR LSFT(KC_4) // $ +#define KC_DLR KC_DOLLAR -#define KC_PERC LSFT(KC_5) // % -#define KC_PERCENT KC_PERC +#define KC_PERCENT LSFT(KC_5) // % +#define KC_PERC KC_PERCENT -#define KC_CIRC LSFT(KC_6) // ^ -#define KC_CIRCUMFLEX KC_CIRC +#define KC_CIRCUMFLEX LSFT(KC_6) // ^ +#define KC_CIRC KC_CIRCUMFLEX -#define KC_AMPR LSFT(KC_7) // & -#define KC_AMPERSAND KC_AMPR +#define KC_AMPERSAND LSFT(KC_7) // & +#define KC_AMPR KC_AMPERSAND -#define KC_ASTR LSFT(KC_8) // * -#define KC_ASTERISK KC_ASTR +#define KC_ASTERISK LSFT(KC_8) // * +#define KC_ASTR KC_ASTERISK -#define KC_LPRN LSFT(KC_9) // ( -#define KC_LEFT_PAREN KC_LPRN +#define KC_LEFT_PAREN LSFT(KC_9) // ( +#define KC_LPRN KC_LEFT_PAREN -#define KC_RPRN LSFT(KC_0) // ) -#define KC_RIGHT_PAREN KC_RPRN +#define KC_RIGHT_PAREN LSFT(KC_0) // ) +#define KC_RPRN KC_RIGHT_PAREN -#define KC_UNDS LSFT(KC_MINS) // _ -#define KC_UNDERSCORE KC_UNDS +#define KC_UNDERSCORE LSFT(KC_MINUS) // _ +#define KC_UNDS KC_UNDERSCORE -#define KC_PLUS LSFT(KC_EQL) // + +#define KC_PLUS LSFT(KC_EQUAL) // + -#define KC_LCBR LSFT(KC_LBRC) // { -#define KC_LEFT_CURLY_BRACE KC_LCBR +#define KC_LEFT_CURLY_BRACE LSFT(KC_LEFT_BRACKET) // { +#define KC_LCBR KC_LEFT_CURLY_BRACE -#define KC_RCBR LSFT(KC_RBRC) // } -#define KC_RIGHT_CURLY_BRACE KC_RCBR +#define KC_RIGHT_CURLY_BRACE LSFT(KC_RIGHT_BRACKET) // } +#define KC_RCBR KC_RIGHT_CURLY_BRACE -#define KC_LABK LSFT(KC_COMM) // < -#define KC_LEFT_ANGLE_BRACKET KC_LABK +#define KC_LEFT_ANGLE_BRACKET LSFT(KC_COMMA) // < +#define KC_LABK KC_LEFT_ANGLE_BRACKET +#define KC_LT KC_LEFT_ANGLE_BRACKET -#define KC_RABK LSFT(KC_DOT) // > -#define KC_RIGHT_ANGLE_BRACKET KC_RABK +#define KC_RIGHT_ANGLE_BRACKET LSFT(KC_DOT) // > +#define KC_RABK KC_RIGHT_ANGLE_BRACKET +#define KC_GT KC_RIGHT_ANGLE_BRACKET -#define KC_COLN LSFT(KC_SCLN) // : -#define KC_COLON KC_COLN +#define KC_COLON LSFT(KC_SEMICOLON) // : +#define KC_COLN KC_COLON -#define KC_PIPE LSFT(KC_BSLS) // | +#define KC_PIPE LSFT(KC_BACKSLASH) // | -#define KC_LT LSFT(KC_COMM) // < +#define KC_QUESTION LSFT(KC_SLASH) // ? +#define KC_QUES KC_QUESTION -#define KC_GT LSFT(KC_DOT) // > - -#define KC_QUES LSFT(KC_SLSH) // ? -#define KC_QUESTION KC_QUES - -#define KC_DQT LSFT(KC_QUOT) // " -#define KC_DOUBLE_QUOTE KC_DQT -#define KC_DQUO KC_DQT +#define KC_DOUBLE_QUOTE LSFT(KC_QUOTE) // " +#define KC_DQUO KC_DOUBLE_QUOTE +#define KC_DQT KC_DOUBLE_QUOTE #define KC_DELT KC_DELETE // Del key (four letter code) diff --git a/quantum/via_ensure_keycode.h b/quantum/via_ensure_keycode.h index a9c1b8ba5d..1aba0cdd2a 100644 --- a/quantum/via_ensure_keycode.h +++ b/quantum/via_ensure_keycode.h @@ -5,362 +5,338 @@ #ifndef VIA_HAS_BROKEN_KEYCODES -_Static_assert(KC_NO == 0, ""); -_Static_assert(KC_TRNS == 1, ""); +// clang-format off -_Static_assert(KC_A == 0x04, ""); -_Static_assert(KC_B == 0x05, ""); -_Static_assert(KC_C == 0x06, ""); -_Static_assert(KC_D == 0x07, ""); -_Static_assert(KC_E == 0x08, ""); -_Static_assert(KC_F == 0x09, ""); -_Static_assert(KC_G == 0x0A, ""); -_Static_assert(KC_H == 0x0B, ""); -_Static_assert(KC_I == 0x0C, ""); -_Static_assert(KC_J == 0x0D, ""); -_Static_assert(KC_K == 0x0E, ""); -_Static_assert(KC_L == 0x0F, ""); -_Static_assert(KC_M == 0x10, ""); -_Static_assert(KC_N == 0x11, ""); -_Static_assert(KC_O == 0x12, ""); -_Static_assert(KC_P == 0x13, ""); -_Static_assert(KC_Q == 0x14, ""); -_Static_assert(KC_R == 0x15, ""); -_Static_assert(KC_S == 0x16, ""); -_Static_assert(KC_T == 0x17, ""); -_Static_assert(KC_U == 0x18, ""); -_Static_assert(KC_V == 0x19, ""); -_Static_assert(KC_W == 0x1A, ""); -_Static_assert(KC_X == 0x1B, ""); -_Static_assert(KC_Y == 0x1C, ""); -_Static_assert(KC_Z == 0x1D, ""); -_Static_assert(KC_1 == 0x1E, ""); -_Static_assert(KC_2 == 0x1F, ""); -_Static_assert(KC_3 == 0x20, ""); -_Static_assert(KC_4 == 0x21, ""); -_Static_assert(KC_5 == 0x22, ""); -_Static_assert(KC_6 == 0x23, ""); -_Static_assert(KC_7 == 0x24, ""); -_Static_assert(KC_8 == 0x25, ""); -_Static_assert(KC_9 == 0x26, ""); -_Static_assert(KC_0 == 0x27, ""); -_Static_assert(KC_ENTER == 0x28, ""); -_Static_assert(KC_ESCAPE == 0x29, ""); -_Static_assert(KC_BSPACE == 0x2A, ""); -_Static_assert(KC_TAB == 0x2B, ""); -_Static_assert(KC_SPACE == 0x2C, ""); -_Static_assert(KC_MINUS == 0x2D, ""); -_Static_assert(KC_EQUAL == 0x2E, ""); -_Static_assert(KC_LBRACKET == 0x2F, ""); -_Static_assert(KC_RBRACKET == 0x30, ""); -_Static_assert(KC_BSLASH == 0x31, ""); -_Static_assert(KC_SCOLON == 0x33, ""); -_Static_assert(KC_QUOTE == 0x34, ""); -_Static_assert(KC_GRAVE == 0x35, ""); -_Static_assert(KC_COMMA == 0x36, ""); -_Static_assert(KC_DOT == 0x37, ""); -_Static_assert(KC_SLASH == 0x38, ""); -_Static_assert(KC_CAPSLOCK == 0x39, ""); -_Static_assert(KC_F1 == 0x3A, ""); -_Static_assert(KC_F2 == 0x3B, ""); -_Static_assert(KC_F3 == 0x3C, ""); -_Static_assert(KC_F4 == 0x3D, ""); -_Static_assert(KC_F5 == 0x3E, ""); -_Static_assert(KC_F6 == 0x3F, ""); -_Static_assert(KC_F7 == 0x40, ""); -_Static_assert(KC_F8 == 0x41, ""); -_Static_assert(KC_F9 == 0x42, ""); -_Static_assert(KC_F10 == 0x43, ""); -_Static_assert(KC_F11 == 0x44, ""); -_Static_assert(KC_F12 == 0x45, ""); -_Static_assert(KC_PSCREEN == 0x46, ""); -_Static_assert(KC_SCROLLLOCK == 0x47, ""); -_Static_assert(KC_PAUSE == 0x48, ""); -_Static_assert(KC_INSERT == 0x49, ""); -_Static_assert(KC_HOME == 0x4A, ""); -_Static_assert(KC_PGUP == 0x4B, ""); -_Static_assert(KC_DELETE == 0x4C, ""); -_Static_assert(KC_END == 0x4D, ""); -_Static_assert(KC_PGDOWN == 0x4E, ""); -_Static_assert(KC_RIGHT == 0x4F, ""); -_Static_assert(KC_LEFT == 0x50, ""); -_Static_assert(KC_DOWN == 0x51, ""); -_Static_assert(KC_UP == 0x52, ""); -_Static_assert(KC_NUMLOCK == 0x53, ""); -_Static_assert(KC_KP_SLASH == 0x54, ""); -_Static_assert(KC_KP_ASTERISK == 0x55, ""); -_Static_assert(KC_KP_MINUS == 0x56, ""); -_Static_assert(KC_KP_PLUS == 0x57, ""); -_Static_assert(KC_KP_ENTER == 0x58, ""); -_Static_assert(KC_KP_1 == 0x59, ""); -_Static_assert(KC_KP_2 == 0x5A, ""); -_Static_assert(KC_KP_3 == 0x5B, ""); -_Static_assert(KC_KP_4 == 0x5C, ""); -_Static_assert(KC_KP_5 == 0x5D, ""); -_Static_assert(KC_KP_6 == 0x5E, ""); -_Static_assert(KC_KP_7 == 0x5F, ""); -_Static_assert(KC_KP_8 == 0x60, ""); -_Static_assert(KC_KP_9 == 0x61, ""); -_Static_assert(KC_KP_0 == 0x62, ""); -_Static_assert(KC_KP_DOT == 0x63, ""); -_Static_assert(KC_APPLICATION == 0x65, ""); -_Static_assert(KC_KP_EQUAL == 0x67, ""); -_Static_assert(KC_KP_COMMA == 0x85, ""); -_Static_assert(KC_LCTRL == 0xE0, ""); -_Static_assert(KC_LSHIFT == 0xE1, ""); -_Static_assert(KC_LALT == 0xE2, ""); -_Static_assert(KC_LGUI == 0xE3, ""); -_Static_assert(KC_RCTRL == 0xE4, ""); -_Static_assert(KC_RSHIFT == 0xE5, ""); -_Static_assert(KC_RALT == 0xE6, ""); -_Static_assert(KC_RGUI == 0xE7, ""); +_Static_assert(KC_NO == 0x0000, ""); +_Static_assert(KC_TRANSPARENT == 0x0001, ""); -_Static_assert(KC_TILD == 0x235, ""); -_Static_assert(KC_EXLM == 0x21E, ""); -_Static_assert(KC_AT == 0x21F, ""); -_Static_assert(KC_HASH == 0x220, ""); -_Static_assert(KC_DLR == 0x221, ""); -_Static_assert(KC_PERC == 0x222, ""); -_Static_assert(KC_CIRC == 0x223, ""); -_Static_assert(KC_AMPR == 0x224, ""); -_Static_assert(KC_ASTR == 0x225, ""); -_Static_assert(KC_LPRN == 0x226, ""); -_Static_assert(KC_RPRN == 0x227, ""); -_Static_assert(KC_UNDS == 0x22D, ""); -_Static_assert(KC_PLUS == 0x22E, ""); -_Static_assert(KC_LCBR == 0x22F, ""); -_Static_assert(KC_RCBR == 0x230, ""); -_Static_assert(KC_LT == 0x236, ""); -_Static_assert(KC_GT == 0x237, ""); -_Static_assert(KC_COLN == 0x233, ""); -_Static_assert(KC_PIPE == 0x231, ""); -_Static_assert(KC_QUES == 0x238, ""); -_Static_assert(KC_DQUO == 0x234, ""); +_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