summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorjust-another-jxliu <just-another-jxliu@users.noreply.github.com>2019-10-22 13:03:39 -0700
committerDrashna Jaelre <drashna@live.com>2019-10-22 13:03:39 -0700
commit51bf3ba3e623d69cf4ad9e9045cf10526e70be15 (patch)
treebeaaed5bc1c73825e5fb9c5c1b878ba8624a70ec /quantum
parentc8fd0156186ed08f88ff73a73c00a58004bf217a (diff)
Fix held key getting stuck when NKRO is toggled (#6570)
* Fix held key getting stuck when NKRO is toggled * Updated file to latest qmk version and added fix to cases MAGIC_UNHOST_NKRO & MAGIC_HOST_NKRO as well. * Revert merged quantum.c
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 2020770ea5..d689a9fbfb 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -563,6 +563,7 @@ bool process_record_quantum(keyrecord_t *record) {
keymap_config.swap_backslash_backspace = true;
break;
case MAGIC_HOST_NKRO:
+ clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = true;
break;
case MAGIC_SWAP_ALT_GUI:
@@ -605,6 +606,7 @@ bool process_record_quantum(keyrecord_t *record) {
keymap_config.swap_backslash_backspace = false;
break;
case MAGIC_UNHOST_NKRO:
+ clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = false;
break;
case MAGIC_UNSWAP_ALT_GUI:
@@ -642,6 +644,7 @@ bool process_record_quantum(keyrecord_t *record) {
#endif
break;
case MAGIC_TOGGLE_NKRO:
+ clear_keyboard(); // clear first buffer to prevent stuck keys
keymap_config.nkro = !keymap_config.nkro;
break;
case MAGIC_EE_HANDS_LEFT: