Fix a build warning and tidy up a keymap (#24805)

This commit is contained in:
Ryan 2025-01-11 02:04:17 +11:00 committed by GitHub
parent 80c90a6952
commit d90b6e4689
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 29 deletions

View File

@ -25,11 +25,6 @@ enum layer_names {
_FN,
};
enum custom_keycodes {
KC_PRVWD = SAFE_RANGE,
KC_NXTWD
};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define FN MO(_FN)
@ -47,6 +42,9 @@ enum custom_keycodes {
#define KC_COLMK PDF(_COLEMAK)
#define KC_HRM PDF(_HRM)
#define KC_PRVWD LCTL(KC_LEFT)
#define KC_NXTWD LCTL(KC_RGHT)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* QWERTY
@ -186,27 +184,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______,_______, _______, _______, _______, _______, _______, _______
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_PRVWD:
if (record->event.pressed) {
register_mods(mod_config(MOD_LCTL));
register_code(KC_LEFT);
} else {
unregister_mods(mod_config(MOD_LCTL));
unregister_code(KC_LEFT);
}
break;
case KC_NXTWD:
if (record->event.pressed) {
register_mods(mod_config(MOD_LCTL));
register_code(KC_RIGHT);
} else {
unregister_mods(mod_config(MOD_LCTL));
unregister_code(KC_RIGHT);
}
break;
}
return true;
}