Compare commits
2 commits
c986e9b0f7
...
c6e976889f
Author | SHA1 | Date | |
---|---|---|---|
c6e976889f | |||
e97eef5f86 |
3 changed files with 17 additions and 2 deletions
|
@ -5,6 +5,8 @@
|
|||
#define LA_SYM MO(SYM)
|
||||
#define LA_NAV MO(NAV)
|
||||
|
||||
#define MUTE LGUI(KC_C)
|
||||
|
||||
enum layers {
|
||||
DEF,
|
||||
SYM,
|
||||
|
@ -37,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
),
|
||||
|
||||
[NAV] = LAYOUT(
|
||||
KC_TAB, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, RESET, KC_CAPS,XXXXXXX,XXXXXXX,XXXXXXX,
|
||||
KC_TAB, XXXXXXX,XXXXXXX,XXXXXXX,MUTE, RESET, KC_CAPS,XXXXXXX,XXXXXXX,XXXXXXX,
|
||||
OS_SHFT,OS_ALT, OS_CTRL,OS_CMD, XXXXXXX, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_BSPC,
|
||||
XXXXXXX,XXXXXXX,OS_RALT,XXXXXXX,KC_PSCR,XXXXXXX,XXXXXXX,XXXXXXX,KC_PGDN,KC_PGUP,XXXXXXX,KC_ENT,
|
||||
XXXXXXX,XXXXXXX,XXXXXXX,_______,_______,XXXXXXX,XXXXXXX,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX
|
||||
|
|
|
@ -37,6 +37,18 @@ void update_oneshot(
|
|||
*state = os_up_unqueued;
|
||||
unregister_code(mod);
|
||||
}
|
||||
if (!is_oneshot_ignored_key(keycode)) {
|
||||
switch (*state) {
|
||||
case os_up_used:
|
||||
unregister_code(mod);
|
||||
break;
|
||||
case os_up_queued:
|
||||
*state = os_up_used;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!is_oneshot_ignored_key(keycode)) {
|
||||
// On non-ignored keyup, consider the oneshot used.
|
||||
|
@ -44,7 +56,7 @@ void update_oneshot(
|
|||
case os_down_unused:
|
||||
*state = os_down_used;
|
||||
break;
|
||||
case os_up_queued:
|
||||
case os_up_used:
|
||||
*state = os_up_unqueued;
|
||||
unregister_code(mod);
|
||||
break;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
typedef enum {
|
||||
os_up_unqueued,
|
||||
os_up_queued,
|
||||
os_up_used,
|
||||
os_down_unused,
|
||||
os_down_used,
|
||||
} oneshot_state;
|
||||
|
|
Loading…
Reference in a new issue