diff options
50 files changed, 31 insertions, 132 deletions
diff --git a/docs/configurator_default_keymaps.md b/docs/configurator_default_keymaps.md index ec74f4740c..4d3c1b8f47 100644 --- a/docs/configurator_default_keymaps.md +++ b/docs/configurator_default_keymaps.md @@ -153,10 +153,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ```c enum keyboard_keycodes { - CUSTOM_1 = SAFE_RANGE, + CUSTOM_1 = QK_KB_0, CUSTOM_2, CUSTOM_3, - NEW_SAFE_RANGE // Important! }; ``` @@ -185,8 +184,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { }; ``` -Note the call to `process_record_user()` at the end. Additionally, users of the keyboard will need to use `NEW_SAFE_RANGE` instead of `SAFE_RANGE` if they wish to add their own custom keycodes at keymap level, beyond what is provided by the keyboard. - +Note the call to `process_record_user()` at the end. ## Additional Reading :id=additional-reading diff --git a/keyboards/annepro2/annepro2.h b/keyboards/annepro2/annepro2.h index 617c6414d2..ad1fce6b03 100644 --- a/keyboards/annepro2/annepro2.h +++ b/keyboards/annepro2/annepro2.h @@ -59,7 +59,7 @@ extern ble_capslock_t ble_capslock; // clang-format on enum AP2KeyCodes { - KC_AP2_BT1 = SAFE_RANGE, + KC_AP2_BT1 = QK_KB_0, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, @@ -76,9 +76,4 @@ enum AP2KeyCodes { KC_AP_RGB_VAD, KC_AP_RGB_TOG, KC_AP_RGB_MOD, - AP2_SAFE_RANGE, }; - -#undef SAFE_RANGE -#define SAFE_RANGE AP2_SAFE_RANGE - diff --git a/keyboards/bajjak/bajjak.h b/keyboards/bajjak/bajjak.h index 126df7932c..25c51273d1 100644 --- a/keyboards/bajjak/bajjak.h +++ b/keyboards/bajjak/bajjak.h @@ -117,16 +117,6 @@ inline void bajjak_led_all_set(uint8_t n) { bajjak_right_led_3_set(n); } -enum BAJJAK_ez_keycodes { - LED_LEVEL = SAFE_RANGE, - TOGGLE_LAYER_COLOR, - EZ_SAFE_RANGE, -}; - -#ifndef WEBUSB_ENABLE -# define WEBUSB_PAIR KC_NO -#endif - typedef union { uint32_t raw; struct { diff --git a/keyboards/bastardkb/charybdis/charybdis.c b/keyboards/bastardkb/charybdis/charybdis.c index 2000641f9a..c321af7aa9 100644 --- a/keyboards/bastardkb/charybdis/charybdis.c +++ b/keyboards/bastardkb/charybdis/charybdis.c @@ -304,7 +304,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { } # endif // !NO_CHARYBDIS_KEYCODES # endif // POINTING_DEVICE_ENABLE - if ((keycode >= POINTER_DEFAULT_DPI_FORWARD && keycode < CHARYBDIS_SAFE_RANGE) || IS_MOUSEKEY(keycode)) { + if (IS_QK_KB(keycode) || IS_MOUSEKEY(keycode)) { debug_charybdis_config_to_console(&g_charybdis_config); } return true; diff --git a/keyboards/bastardkb/charybdis/charybdis.h b/keyboards/bastardkb/charybdis/charybdis.h index 2e311a4aaf..06142aded2 100644 --- a/keyboards/bastardkb/charybdis/charybdis.h +++ b/keyboards/bastardkb/charybdis/charybdis.h @@ -43,7 +43,6 @@ enum charybdis_keycodes { SNIPING_MODE_TOGGLE, DRAGSCROLL_MODE, DRAGSCROLL_MODE_TOGGLE, - CHARYBDIS_SAFE_RANGE, }; # define DPI_MOD POINTER_DEFAULT_DPI_FORWARD diff --git a/keyboards/bastardkb/charybdis/readme.md b/keyboards/bastardkb/charybdis/readme.md index dd0fca0015..01eef250cd 100644 --- a/keyboards/bastardkb/charybdis/readme.md +++ b/keyboards/bastardkb/charybdis/readme.md @@ -121,7 +121,7 @@ The Charybdis firmware defines a number of keycodes to leverage its features, na ``` #ifndef NO_CHARYBDIS_KEYCODES enum charybdis_keycodes { - POINTER_DEFAULT_DPI_FORWARD = SAFE_RANGE, + POINTER_DEFAULT_DPI_FORWARD = QK_KB_0, POINTER_DEFAULT_DPI_REVERSE, POINTER_SNIPING_DPI_FORWARD, POINTER_SNIPING_DPI_REVERSE, @@ -129,7 +129,6 @@ enum charybdis_keycodes { SNIPING_MODE_TOGGLE, DRAGSCROLL_MODE, DRAGSCROLL_MODE_TOGGLE, - CHARYBDIS_SAFE_RANGE, }; #define DPI_MOD POINTER_DEFAULT_DPI_FORWARD @@ -143,20 +142,6 @@ enum charybdis_keycodes { #endif // !NO_CHARYBDIS_KEYCODES ``` -Users extending the keycode set themselves (either in their keymap, or in their userspace) must start at `CHARYBDIS_SAFE_RANGE` to avoid conflicts, _eg._: - -```c -enum userspace_keycodes { -#ifndef NO_CHARYBDIS_KEYCODES - MY_FIRST_KEYCODE = CHARYBDIS_SAFE_RANGE, -#else - MY_FIRST_KEYCODE = SAFE_RANGE, -#endif // !NO_CHARYBDIS_KEYCODES - MY_SECOND_KEYCODE, - … -}; -``` - To disable the custom keycodes, and reduce binary size, simply add a definition in `config.h`: ```c diff --git a/keyboards/bastardkb/dilemma/dilemma.c b/keyboards/bastardkb/dilemma/dilemma.c index b474a24e7f..5452f9e7f6 100644 --- a/keyboards/bastardkb/dilemma/dilemma.c +++ b/keyboards/bastardkb/dilemma/dilemma.c @@ -308,7 +308,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { # endif // !NO_DILEMMA_KEYCODES # endif // POINTING_DEVICE_ENABLE debug_dilemma_config_to_console(&g_dilemma_config); - if ((keycode >= POINTER_DEFAULT_DPI_FORWARD && keycode < DILEMMA_SAFE_RANGE) || IS_MOUSEKEY(keycode)) { + if (IS_QK_KB(keycode) || IS_MOUSEKEY(keycode)) { debug_dilemma_config_to_console(&g_dilemma_config); } return true; diff --git a/keyboards/bastardkb/dilemma/dilemma.h b/keyboards/bastardkb/dilemma/dilemma.h index 469986839d..f2c0784533 100644 --- a/keyboards/bastardkb/dilemma/dilemma.h +++ b/keyboards/bastardkb/dilemma/dilemma.h @@ -40,7 +40,6 @@ enum dilemma_keycodes { SNIPING_MODE_TOGGLE, DRAGSCROLL_MODE, DRAGSCROLL_MODE_TOGGLE, - DILEMMA_SAFE_RANGE, }; # define DPI_MOD POINTER_DEFAULT_DPI_FORWARD diff --git a/keyboards/clueboard/2x1800/2019/2019.h b/keyboards/clueboard/2x1800/2019/2019.h index 5debfacc5d..c5869ff66f 100644 --- a/keyboards/clueboard/2x1800/2019/2019.h +++ b/keyboards/clueboard/2x1800/2019/2019.h @@ -18,16 +18,12 @@ #include "quantum.h" enum TWOx1800_keycodes { - ENC_BTN1 = SAFE_RANGE, + ENC_BTN1 = QK_KB_0, ENC_BTN2, ENC_BTN3, ENC_BTN4, - NEW_SAFE_RANGE }; -#undef SAFE_RANGE -#define SAFE_RANGE NEW_SAFE_RANGE - // Encoder update function that returns true/false bool encoder_update_keymap(uint8_t index, bool clockwise); diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index 7243a6a18d..2dbfdbba73 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -127,9 +127,8 @@ inline void ergodox_led_all_set(uint8_t n) { } enum ergodox_ez_keycodes { - LED_LEVEL = SAFE_RANGE, + LED_LEVEL = QK_KB_0, TOGGLE_LAYER_COLOR, - EZ_SAFE_RANGE, }; #ifndef WEBUSB_ENABLE diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c index ede7d0e9fb..94d68cb870 100644 --- a/keyboards/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -8,11 +8,7 @@ enum layers { }; enum custom_keycodes { -#ifdef ORYX_CONFIGURATOR - VRSN = EZ_SAFE_RANGE, -#else VRSN = SAFE_RANGE, -#endif }; // clang-format off diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c index 6d466cc0de..14c3a46b69 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c @@ -27,7 +27,7 @@ #define NO_BSLS_ALT KC_EQUAL enum custom_keycodes { - RGB_SLD = EZ_SAFE_RANGE, + RGB_SLD = SAFE_RANGE, MS_WH_UP, MS_WH_DOWN, MS_WH_RIGHT, diff --git a/keyboards/ergodox_ez/keymaps/stamm/keymap.c b/keyboards/ergodox_ez/keymaps/stamm/keymap.c index 21f58b298c..b7be1f72c1 100644 --- a/keyboards/ergodox_ez/keymaps/stamm/keymap.c +++ b/keyboards/ergodox_ez/keymaps/stamm/keymap.c @@ -37,7 +37,7 @@ #define ARROWS MO(_3_ARROW) enum custom_keycodes { - RGB_SLD = EZ_SAFE_RANGE, + RGB_SLD = SAFE_RANGE, ALT_TAB, }; diff --git a/keyboards/ffkeebs/puca/puca.h b/keyboards/ffkeebs/puca/puca.h index ab4dc37916..5497c08057 100644 --- a/keyboards/ffkeebs/puca/puca.h +++ b/keyboards/ffkeebs/puca/puca.h @@ -18,15 +18,12 @@ #include "quantum.h" -/* Keycodes defined here can be used by any keymap. If you wish to - * define additional keycodes for your personal keymap only, assign - * your first custom keycode to `= NEW_SAFE_RANGE`. +/* Keycodes defined here can be used by any keymap. * * See `process_record_kb()` in `puca.c`. */ enum keyboard_keycodes { - MC_00 = SAFE_RANGE, - NEW_SAFE_RANGE, + MC_00 = QK_KB_0, }; #define XXX KC_NO diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.h b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h index 8ec9bceaf4..14e95b8a3d 100644 --- a/keyboards/handwired/tractyl_manuform/tractyl_manuform.h +++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h @@ -33,9 +33,7 @@ enum charybdis_keycodes { SNIPING_MODE_TOGGLE, DRAGSCROLL_MODE, DRAGSCROLL_MODE_TOGGLE, - KEYMAP_SAFE_RANGE, }; -# define CHARYBDIS_SAFE_RANGE KEYMAP_SAFE_RANGE # define DPI_MOD POINTER_DEFAULT_DPI_FORWARD # define DPI_RMOD POINTER_DEFAULT_DPI_REVERSE # define S_D_MOD POINTER_SNIPING_DPI_FORWARD diff --git a/keyboards/mechwild/puckbuddy/puckbuddy.h b/keyboards/mechwild/puckbuddy/puckbuddy.h index 42c7ac16f0..31bcad6917 100644 --- a/keyboards/mechwild/puckbuddy/puckbuddy.h +++ b/keyboards/mechwild/puckbuddy/puckbuddy.h @@ -48,5 +48,4 @@ enum keyboard_keycodes { TAP_ON, TAP_OFF, TAP_TOG, - NEW_SAFE_RANGE }; diff --git a/keyboards/moonlander/keymaps/default/keymap.c b/keyboards/moonlander/keymaps/default/keymap.c index d747e9eaf2..754227262f 100644 --- a/keyboards/moonlander/keymaps/default/keymap.c +++ b/keyboards/moonlander/keymaps/default/keymap.c @@ -28,7 +28,7 @@ enum layers { }; enum custom_keycodes { - VRSN = ML_SAFE_RANGE, + VRSN = SAFE_RANGE, }; // clang-format off diff --git a/keyboards/moonlander/keymaps/shahn-neo/keymap.c b/keyboards/moonlander/keymaps/shahn-neo/keymap.c index 27ccdbb629..fc174a62fe 100644 --- a/keyboards/moonlander/keymaps/shahn-neo/keymap.c +++ b/keyboards/moonlander/keymaps/shahn-neo/keymap.c @@ -24,7 +24,7 @@ enum layers { }; enum custom_keycodes { - a_umlaut = ML_SAFE_RANGE, + a_umlaut = SAFE_RANGE, o_umlaut, u_umlaut, eszett, diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h index 96e0b0ff14..400c97be0d 100644 --- a/keyboards/moonlander/moonlander.h +++ b/keyboards/moonlander/moonlander.h @@ -90,9 +90,8 @@ extern bool mcp23018_leds[]; // clang-format on enum planck_ez_keycodes { - TOGGLE_LAYER_COLOR = SAFE_RANGE, + TOGGLE_LAYER_COLOR = QK_KB_0, LED_LEVEL, - ML_SAFE_RANGE, }; #ifndef WEBUSB_ENABLE diff --git a/keyboards/mxss/keymaps/default/keymap.c b/keyboards/mxss/keymaps/default/keymap.c index 8fe84d6b45..e7f5181a69 100644 --- a/keyboards/mxss/keymaps/default/keymap.c +++ b/keyboards/mxss/keymaps/default/keymap.c @@ -29,11 +29,6 @@ hs_set layer_colors[4] = { }; size_t lc_size = ARRAY_SIZE(layer_colors); -// Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control -enum custom_keycodes { - MY_KEYCODE = NEW_SAFE_RANGE, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( /* Base */ QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, diff --git a/keyboards/mxss/mxss_frontled.h b/keyboards/mxss/mxss_frontled.h index 71aba3a793..c8d4199d47 100644 --- a/keyboards/mxss/mxss_frontled.h +++ b/keyboards/mxss/mxss_frontled.h @@ -67,7 +67,6 @@ enum fled_keycodes { FLED_MOD = QK_KB_0, // QK_KB_0 = VIA custom keycode start FLED_VAI, FLED_VAD, - NEW_SAFE_RANGE // define a new safe range }; void fled_init(void); // Run init functions for front LEDs diff --git a/keyboards/mxss/readme.md b/keyboards/mxss/readme.md index f35709adee..17343be526 100644 --- a/keyboards/mxss/readme.md +++ b/keyboards/mxss/readme.md @@ -53,7 +53,3 @@ Colors for FLED_INDI mode are hardcoded as hue/saturation values, the caps lock - FLED_MOD - Cycle between the 3 modes (FLED_OFF -> FLED_RGB -> FLED_INDI) - FLED_VAI - Increase front LED brightness - FLED_VAD - Decrease front LED brightness - - # Further Notes - - As SAFE_RANGE is used for defining the custom keycodes seen above, please use NEW_SAFE_RANGE as the starting value for any custom keycodes in keymap.c, as per the example. diff --git a/keyboards/mxss/templates/keymap.c b/keyboards/mxss/templates/keymap.c index 48cab22852..43e3c25932 100644 --- a/keyboards/mxss/templates/keymap.c +++ b/keyboards/mxss/templates/keymap.c @@ -29,12 +29,6 @@ hs_set layer_colors[4] = { }; size_t lc_size = ARRAY_SIZE(layer_colors); -// Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control -enum custom_keycodes { - MY_KEYCODE = NEW_SAFE_RANGE, -}; - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __KEYMAP_GOES_HERE__ }; diff --git a/keyboards/oddball/oddball.h b/keyboards/oddball/oddball.h index 1d13459c7a..2a8e2fd92d 100644 --- a/keyboards/oddball/oddball.h +++ b/keyboards/oddball/oddball.h @@ -36,7 +36,7 @@ } enum custom_keycodes { - KC_SCROLL = SAFE_RANGE, + KC_SCROLL = QK_KB_0, KC_CPI_1, KC_CPI_2, KC_CPI_3 diff --git a/keyboards/omnikeyish/omnikeyish.h b/keyboards/omnikeyish/omnikeyish.h index 8f3e69bc37..93835bd45d 100644 --- a/keyboards/omnikeyish/omnikeyish.h +++ b/keyboards/omnikeyish/omnikeyish.h @@ -3,8 +3,7 @@ #include "quantum.h" enum keycodes { - QWERTY = SAFE_RANGE, - DYNAMIC_MACRO_RANGE + DYNAMIC_MACRO_RANGE = QK_KB_0 }; #include "dynamic_macro.h" diff --git a/keyboards/orthocode/orthocode.h b/keyboards/orthocode/orthocode.h index fd3fa92744..5e87418706 100644 --- a/keyboards/orthocode/orthocode.h +++ b/keyboards/orthocode/orthocode.h @@ -38,5 +38,4 @@ enum custom_keycodes { SHIFTSPACE = QK_KB_0, - QWERTY }; diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h index 19cc26eea3..3e1a682f68 100644 --- a/keyboards/planck/ez/ez.h +++ b/keyboards/planck/ez/ez.h @@ -68,9 +68,8 @@ void planck_ez_left_led_off(void); void planck_ez_left_led_level(uint8_t level); enum planck_ez_keycodes { - LED_LEVEL = SAFE_RANGE, + LED_LEVEL = QK_KB_0, TOGGLE_LAYER_COLOR, - EZ_SAFE_RANGE, }; #ifndef WEBUSB_ENABLE diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c index a85042ef66..4d3d16f4a7 100644 --- a/keyboards/planck/keymaps/charlesrocket/keymap.c +++ b/keyboards/planck/keymaps/charlesrocket/keymap.c @@ -20,7 +20,7 @@ #define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) enum planck_keycodes { - RGB_SLD = EZ_SAFE_RANGE, + RGB_SLD = SAFE_RANGE, }; enum planck_layers { diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c index 035fd3d98b..7996222bef 100644 --- a/keyboards/planck/keymaps/oryx/keymap.c +++ b/keyboards/planck/keymaps/oryx/keymap.c @@ -18,7 +18,7 @@ #include QMK_KEYBOARD_H enum planck_keycodes { - RGB_SLD = EZ_SAFE_RANGE, + RGB_SLD = SAFE_RANGE, }; enum planck_layers { diff --git a/keyboards/ploopyco/mouse/keymaps/default/keymap.c b/keyboards/ploopyco/mouse/keymaps/default/keymap.c index 8145ffb1c3..29d81b8061 100644 --- a/keyboards/ploopyco/mouse/keymaps/default/keymap.c +++ b/keyboards/ploopyco/mouse/keymaps/default/keymap.c @@ -17,8 +17,6 @@ */ #include QMK_KEYBOARD_H -// safe range starts at `PLOOPY_SAFE_RANGE` instead. - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT(/* Base */ C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, C(KC_V), KC_BTN4, KC_BTN5, DPI_CONFIG) diff --git a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c index 056a1f7903..cf0b57d433 100644 --- a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c +++ b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c @@ -17,8 +17,6 @@ */ #include QMK_KEYBOARD_H -// safe range starts at `PLOOPY_SAFE_RANGE` instead. - // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( diff --git a/keyboards/ploopyco/mouse/mouse.h b/keyboards/ploopyco/mouse/mouse.h index 906b6c9308..9123315fd4 100644 --- a/keyboards/ploopyco/mouse/mouse.h +++ b/keyboards/ploopyco/mouse/mouse.h @@ -43,7 +43,6 @@ extern uint16_t dpi_array[]; enum ploopy_keycodes { DPI_CONFIG = QK_KB_0, DRAG_SCROLL, - PLOOPY_SAFE_RANGE, }; bool encoder_update_user(uint8_t index, bool clockwise); diff --git a/keyboards/ploopyco/trackball/keymaps/default/keymap.c b/keyboards/ploopyco/trackball/keymaps/default/keymap.c index 40f70ab99b..83a4a16847 100644 --- a/keyboards/ploopyco/trackball/keymaps/default/keymap.c +++ b/keyboards/ploopyco/trackball/keymaps/default/keymap.c @@ -17,8 +17,6 @@ */ #include QMK_KEYBOARD_H -// safe range starts at `PLOOPY_SAFE_RANGE` instead. - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ KC_BTN1, KC_BTN3, KC_BTN2, diff --git a/keyboards/ploopyco/trackball/trackball.h b/keyboards/ploopyco/trackball/trackball.h index d6c4b0f985..4cdae526aa 100644 --- a/keyboards/ploopyco/trackball/trackball.h +++ b/keyboards/ploopyco/trackball/trackball.h @@ -46,7 +46,6 @@ extern uint16_t dpi_array[]; enum ploopy_keycodes { DPI_CONFIG = QK_KB_0, DRAG_SCROLL, - PLOOPY_SAFE_RANGE, }; bool encoder_update_user(uint8_t index, bool clockwise); diff --git a/keyboards/ploopyco/trackball_mini/keymaps/default/keymap.c b/keyboards/ploopyco/trackball_mini/keymaps/default/keymap.c index 5e7c684d19..3659076bec 100644 --- a/keyboards/ploopyco/trackball_mini/keymaps/default/keymap.c +++ b/keyboards/ploopyco/trackball_mini/keymaps/default/keymap.c @@ -18,8 +18,6 @@ */ #include QMK_KEYBOARD_H -// safe range starts at `PLOOPY_SAFE_RANGE` instead. - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ KC_BTN1, KC_BTN3, KC_BTN2, diff --git a/keyboards/ploopyco/trackball_mini/keymaps/drag_scroll/keymap.c b/keyboards/ploopyco/trackball_mini/keymaps/drag_scroll/keymap.c index 7eb973216b..b6c71c6ece 100644 --- a/keyboards/ploopyco/trackball_mini/keymaps/drag_scroll/keymap.c +++ b/keyboards/ploopyco/trackball_mini/keymaps/drag_scroll/keymap.c @@ -21,7 +21,7 @@ bool is_drag_scroll = false; enum custom_keycodes { - DRAG_SCROLL = PLOOPY_SAFE_RANGE, + DRAG_SCROLL = SAFE_RANGE, }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.h b/keyboards/ploopyco/trackball_mini/trackball_mini.h index cbd84cc4b4..f212ec17ca 100644 --- a/keyboards/ploopyco/trackball_mini/trackball_mini.h +++ b/keyboards/ploopyco/trackball_mini/trackball_mini.h @@ -43,7 +43,6 @@ extern keyboard_config_t keyboard_config; enum ploopy_keycodes { DPI_CONFIG = QK_KB_0, DRAG_SCROLL, - PLOOPY_SAFE_RANGE, }; bool encoder_update_user(uint8_t index, bool clockwise); diff --git a/keyboards/ploopyco/trackball_nano/keymaps/default/keymap.c b/keyboards/ploopyco/trackball_nano/keymaps/default/keymap.c index dfc19787a6..871f8006ea 100644 --- a/keyboards/ploopyco/trackball_nano/keymaps/default/keymap.c +++ b/keyboards/ploopyco/trackball_nano/keymaps/default/keymap.c @@ -18,7 +18,5 @@ */ #include QMK_KEYBOARD_H -// safe range starts at `PLOOPY_SAFE_RANGE` instead. - // Dummy const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {{{ KC_NO }}}; diff --git a/keyboards/ploopyco/trackball_nano/keymaps/maddie/keymap.c b/keyboards/ploopyco/trackball_nano/keymaps/maddie/keymap.c index 5e9b3e8e19..370eb95aa0 100644 --- a/keyboards/ploopyco/trackball_nano/keymaps/maddie/keymap.c +++ b/keyboards/ploopyco/trackball_nano/keymaps/maddie/keymap.c @@ -23,7 +23,6 @@ #define DELTA_X_THRESHOLD 60 #define DELTA_Y_THRESHOLD 15 -// safe range starts at `PLOOPY_SAFE_RANGE` instead. bool scroll_enabled = false; bool lock_state = false; diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.h b/keyboards/ploopyco/trackball_nano/trackball_nano.h index 4cdbc7f11f..e3bd0cb351 100644 --- a/keyboards/ploopyco/trackball_nano/trackball_nano.h +++ b/keyboards/ploopyco/trackball_nano/trackball_nano.h @@ -31,8 +31,7 @@ typedef union { extern keyboard_config_t keyboard_config; enum ploopy_keycodes { - DPI_CONFIG = SAFE_RANGE, - PLOOPY_SAFE_RANGE, + DPI_CONFIG = QK_KB_0, }; void cycle_dpi(void); diff --git a/keyboards/ploopyco/trackball_thumb/keymaps/default/keymap.c b/keyboards/ploopyco/trackball_thumb/keymaps/default/keymap.c index 897a5761c7..8729deabc1 100644 --- a/keyboards/ploopyco/trackball_thumb/keymaps/default/keymap.c +++ b/keyboards/ploopyco/trackball_thumb/keymaps/default/keymap.c @@ -17,8 +17,6 @@ */ #include QMK_KEYBOARD_H -// safe range starts at `PLOOPY_SAFE_RANGE` instead. - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN5, diff --git a/keyboards/ploopyco/trackball_thumb/trackball_thumb.h b/keyboards/ploopyco/trackball_thumb/trackball_thumb.h index 9a01944282..356b8902db 100644 --- a/keyboards/ploopyco/trackball_thumb/trackball_thumb.h +++ b/keyboards/ploopyco/trackball_thumb/trackball_thumb.h @@ -48,5 +48,4 @@ extern uint16_t dpi_array[]; enum ploopy_keycodes { DPI_CONFIG = QK_KB_0, DRAG_SCROLL, - PLOOPY_SAFE_RANGE, }; diff --git a/keyboards/rubi/keymaps/default/keymap.c b/keyboards/rubi/keymaps/default/keymap.c index 8f1af93c58..eb1102921c 100644 --- a/keyboards/rubi/keymaps/default/keymap.c +++ b/keyboards/rubi/keymaps/default/keymap.c @@ -15,11 +15,6 @@ */ #include QMK_KEYBOARD_H - -// enum custom_keycodes { -// FIRST = NEW_SAFE_RANGE, -// }; - // Defines names for use in layer keycodes and the keymap const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ diff --git a/keyboards/rubi/rubi.h b/keyboards/rubi/rubi.h index 472ce8e000..17454c8c79 100644 --- a/keyboards/rubi/rubi.h +++ b/keyboards/rubi/rubi.h @@ -20,11 +20,10 @@ #define CALC_DIGITS 12 enum rubi_keycodes { - ENC_PRESS = SAFE_RANGE, + ENC_PRESS = QK_KB_0, CL_PLUS, CL_STAR, - CL_TYPE, - NEW_SAFE_RANGE + CL_TYPE }; enum oled_modes { diff --git a/keyboards/terrazzo/terrazzo.h b/keyboards/terrazzo/terrazzo.h index 526b3f9251..85b35e3050 100644 --- a/keyboards/terrazzo/terrazzo.h +++ b/keyboards/terrazzo/terrazzo.h @@ -108,7 +108,7 @@ enum terrazzo_matrix_effects { }; enum terrazzo_keycodes { - TZ_NXT = SAFE_RANGE, + TZ_NXT = QK_KB_0, TZ_PRV, TZ_OFF }; diff --git a/keyboards/v60_type_r/v60_type_r.h b/keyboards/v60_type_r/v60_type_r.h index 8494897e62..7a82c513ad 100644 --- a/keyboards/v60_type_r/v60_type_r.h +++ b/keyboards/v60_type_r/v60_type_r.h @@ -25,7 +25,7 @@ void rgb_init(void); void set_rgb_color(uint8_t pin, uint8_t value, uint8_t timer_value); enum my_keycodes { - RGB_RI = SAFE_RANGE, + RGB_RI = QK_KB_0, RGB_RD, RGB_GI, RGB_GD, diff --git a/keyboards/yushakobo/navpad/navpad_prefs.h b/keyboards/yushakobo/navpad/navpad_prefs.h index 866b137c81..d9d2286e5b 100644 --- a/keyboards/yushakobo/navpad/navpad_prefs.h +++ b/keyboards/yushakobo/navpad/navpad_prefs.h @@ -19,7 +19,7 @@ #include "quantum.h" enum custom_keycodes { - TAP_00 = SAFE_RANGE + TAP_00 = QK_KB_0 }; enum layer_name { diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index fd737da717..f931b7e4c7 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -34,7 +34,7 @@ #define QK_RALT 0x1400 #define QK_RGUI 0x1800 -#define SAFE_RANGE QK_KB +#define SAFE_RANGE QK_USER // clang-format on // Generic decoding for the whole QK_MODS range diff --git a/users/drashna/keyrecords/process_records.h b/users/drashna/keyrecords/process_records.h index 0acd7e010d..5c8fe889e4 100644 --- a/users/drashna/keyrecords/process_records.h +++ b/users/drashna/keyrecords/process_records.h @@ -4,16 +4,8 @@ #pragma once #include "drashna.h" -#if defined(KEYBOARD_handwired_tractyl_manuform) && defined(POINTING_DEVICE_ENABLE) -# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE -#elif defined(KEYBOARD_bastardkb_charybdis) -# define PLACEHOLDER_SAFE_RANGE CHARYBDIS_SAFE_RANGE -#else -# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE -#endif - enum userspace_custom_keycodes { - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info + VRSN = SAFE_RANGE, // Prints QMK Firmware and board info KC_QWERTY, // Sets default layer to QWERTY FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY KC_COLEMAK_DH, // Sets default layer to COLEMAK diff --git a/users/drashna/pointing/pointing.c b/users/drashna/pointing/pointing.c index 1b64502ed3..a74c9fd41e 100644 --- a/users/drashna/pointing/pointing.c +++ b/users/drashna/pointing/pointing.c @@ -82,9 +82,9 @@ bool is_mouse_record_user(uint16_t keycode, keyrecord_t* record) { # if defined(KEYBOARD_ploopy) case DPI_CONFIG: # elif (defined(KEYBOARD_bastardkb_charybdis) || defined(KEYBOARD_handwired_tractyl_manuform)) && !defined(NO_CHARYBDIS_KEYCODES) - case SAFE_RANGE ...(CHARYBDIS_SAFE_RANGE - 1): + case QK_KB ... QK_KB_MAX: # elif (defined(KEYBOARD_bastardkb_dilemma) && !defined(NO_DILEMMA_KEYCODES)) - case SAFE_RANGE ...(DILEMMA_SAFE_RANGE - 1): + case QK_KB ... QK_KB_MAX: # endif case KC_ACCEL: return true; |