diff --git a/quantum/action_util.c b/quantum/action_util.c index 452eccc9a5e3..7c4a250618f1 100644 --- a/quantum/action_util.c +++ b/quantum/action_util.c @@ -187,8 +187,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); @@ -220,7 +221,7 @@ void oneshot_disable(void) { } bool is_oneshot_enabled(void) { - return keymap_config.oneshot_disable; + return !keymap_config.oneshot_disable; } #endif