summaryrefslogtreecommitdiff
path: root/common/keyboard_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/keyboard_scan.c')
-rw-r--r--common/keyboard_scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/keyboard_scan.c b/common/keyboard_scan.c
index 876d06c9fc..fa8ce3d98f 100644
--- a/common/keyboard_scan.c
+++ b/common/keyboard_scan.c
@@ -122,10 +122,12 @@ static int keyboard_scan_is_enabled(void)
void keyboard_scan_enable(int enable, enum kb_scan_disable_masks mask)
{
/* Access atomically */
- if (enable)
+ if (enable) {
atomic_clear((uint32_t *)&disable_scanning_mask, mask);
- else
+ } else {
atomic_or((uint32_t *)&disable_scanning_mask, mask);
+ clear_typematic_key();
+ }
/* Let the task figure things out */
task_wake(TASK_ID_KEYSCAN);