Skip to content

Commit

Permalink
Fix flipped One Shot logic (#16617)
Browse files Browse the repository at this point in the history
  • Loading branch information
getreuer authored Mar 11, 2022
1 parent 1833e65 commit 0eb42e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions quantum/action_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ bool is_oneshot_layer_active(void) {
* FIXME: needs doc
*/
void oneshot_set(bool active) {
if (keymap_config.oneshot_disable != active) {
keymap_config.oneshot_disable = active;
const bool disable = !active;
if (keymap_config.oneshot_disable != disable) {
keymap_config.oneshot_disable = disable;
eeconfig_update_keymap(keymap_config.raw);
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
dprintf("Oneshot: active: %d\n", active);
Expand Down Expand Up @@ -235,7 +236,7 @@ void oneshot_disable(void) {
}

bool is_oneshot_enabled(void) {
return keymap_config.oneshot_disable;
return !keymap_config.oneshot_disable;
}

#endif
Expand Down

0 comments on commit 0eb42e0

Please sign in to comment.