Update keymaps to use PDF keycode (#24633)

This commit is contained in:
Joel Challis 2024-11-23 13:35:34 +00:00 committed by GitHub
parent 4a5bae51cd
commit e4e015c0c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
80 changed files with 286 additions and 1705 deletions

View file

@ -24,11 +24,9 @@ enum layers {
_L3,
};
enum custom_keycodes {
DVORAK = SAFE_RANGE,
QWERTY,
COLEMAK
};
#define QWERTY PDF(_QW)
#define DVORAK PDF(_DV)
#define COLEMAK PDF(_CM)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = LAYOUT( /* Qwerty */
@ -68,26 +66,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DV);
}
return false;
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QW);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_CM);
}
return false;
default:
return true;
}
return true;
};