1
0

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
80 changed files with 286 additions and 1705 deletions

View File

@@ -18,11 +18,9 @@
#define L_CURBR LSFT(KC_LBRC)
#define R_CURBR LSFT(KC_RBRC)
enum custom_keycodes {
DVORAK = SAFE_RANGE,
QWERTY,
COLEMAK
};
#define QWERTY PDF(_QW)
#define COLEMAK PDF(_CM)
#define DVORAK PDF(_DV)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = LAYOUT( /* Qwerty */
@@ -62,26 +60,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;
};