summaryrefslogtreecommitdiffstats
path: root/quantum/action_util.c
diff options
context:
space:
mode:
authorPascal Getreuer <50221757+getreuer@users.noreply.github.com>2022-03-11 05:28:52 -0800
committerGitHub <noreply@github.com>2022-03-11 13:28:52 +0000
commit0eb42e042cb161d961d4d0fd6351eeed122f1e0c (patch)
treec6cfaaa9db1ad1c3a3ebe8d234fca1aa51c9153b /quantum/action_util.c
parent1833e65370395d438b67b98a317e54d27a742c16 (diff)
Fix flipped One Shot logic (#16617)
Diffstat (limited to 'quantum/action_util.c')
-rw-r--r--quantum/action_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/quantum/action_util.c b/quantum/action_util.c
index 4ea0bf61fb..cf81370d4a 100644
--- a/quantum/action_util.c
+++ b/quantum/action_util.c
@@ -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);
@@ -235,7 +236,7 @@ void oneshot_disable(void) {
}
bool is_oneshot_enabled(void) {
- return keymap_config.oneshot_disable;
+ return !keymap_config.oneshot_disable;
}
#endif