summaryrefslogtreecommitdiff
path: root/tmk_core/common/action.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/action.c')
-rw-r--r--tmk_core/common/action.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 0ec4a43eee..2deafd465f 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -754,6 +754,13 @@ void register_code(uint8_t code) {
*/
#endif
{
+ // Force a new key press if the key is already pressed
+ // without this, keys with the same keycode, but different
+ // modifiers will be reported incorrectly, see issue #1708
+ if (is_key_pressed(keyboard_report, code)) {
+ del_key(code);
+ send_keyboard_report();
+ }
add_key(code);
send_keyboard_report();
}