diff options
author | zvecr <git@zvecr.com> | 2022-11-22 02:48:11 +0000 |
---|---|---|
committer | zvecr <git@zvecr.com> | 2022-11-22 02:48:11 +0000 |
commit | ab17d34dbd4358537435bdb4c6954b0af2040d36 (patch) | |
tree | a42673a53e2151be180ce21c51644eda5267350d /keyboards/sofle | |
parent | 08805cada0b935cafffeb4e402c8ee24b1a946fa (diff) | |
parent | 06a3801a27881d7a409ea1749002393d765294f9 (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/sofle')
-rw-r--r-- | keyboards/sofle/keymaps/default/keymap.c | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c index 2fc27b816d..377b4498e6 100644 --- a/keyboards/sofle/keymaps/default/keymap.c +++ b/keyboards/sofle/keymaps/default/keymap.c @@ -12,9 +12,6 @@ enum sofle_layers { enum custom_keycodes { KC_QWERTY = SAFE_RANGE, KC_COLEMAK, - KC_LOWER, - KC_RAISE, - KC_ADJUST, KC_PRVWD, KC_NXTWD, KC_LSTRT, @@ -45,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LGUI,KC_LALT,KC_LCTL, KC_LOWER, KC_ENT, KC_SPC, KC_RAISE, KC_RCTL, KC_RALT, KC_RGUI + KC_LGUI,KC_LALT,KC_LCTL, MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI ), /* * COLEMAK @@ -68,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LGUI,KC_LALT,KC_LCTL,KC_LOWER, KC_ENT, KC_SPC, KC_RAISE, KC_RCTL, KC_RALT, KC_RGUI + KC_LGUI,KC_LALT,KC_LCTL,MO(_LOWER), KC_ENT, KC_SPC, MO(_RAISE), KC_RCTL, KC_RALT, KC_RGUI ), /* LOWER * ,-----------------------------------------. ,-----------------------------------------. @@ -211,6 +208,10 @@ bool oled_task_user(void) { #endif +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_QWERTY: @@ -223,31 +224,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_single_persistent_default_layer(_COLEMAK); } return false; - case KC_LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case KC_RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case KC_ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; case KC_PRVWD: if (record->event.pressed) { if (keymap_config.swap_lctl_lgui) { |