aboutsummaryrefslogtreecommitdiff
path: root/quantum/action_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/action_util.c')
-rw-r--r--quantum/action_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/quantum/action_util.c b/quantum/action_util.c
index 9a85bd504..78e02aec1 100644
--- a/quantum/action_util.c
+++ b/quantum/action_util.c
@@ -170,7 +170,7 @@ void reset_oneshot_layer(void) {
170void clear_oneshot_layer_state(oneshot_fullfillment_t state) { 170void clear_oneshot_layer_state(oneshot_fullfillment_t state) {
171 uint8_t start_state = oneshot_layer_data; 171 uint8_t start_state = oneshot_layer_data;
172 oneshot_layer_data &= ~state; 172 oneshot_layer_data &= ~state;
173 if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) || keymap_config.oneshot_disable) { 173 if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) && !keymap_config.oneshot_disable) {
174 layer_off(get_oneshot_layer()); 174 layer_off(get_oneshot_layer());
175 reset_oneshot_layer(); 175 reset_oneshot_layer();
176 } 176 }
@@ -189,6 +189,7 @@ void oneshot_set(bool active) {
189 if (keymap_config.oneshot_disable != active) { 189 if (keymap_config.oneshot_disable != active) {
190 keymap_config.oneshot_disable = active; 190 keymap_config.oneshot_disable = active;
191 eeconfig_update_keymap(keymap_config.raw); 191 eeconfig_update_keymap(keymap_config.raw);
192 clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
192 dprintf("Oneshot: active: %d\n", active); 193 dprintf("Oneshot: active: %d\n", active);
193 } 194 }
194} 195}