From 402697c0a3ebc8b5c734d34379ccd219739567e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Thu, 9 Nov 2017 22:26:44 +0100 Subject: [PATCH] Don't call applyKeyAction() when a secondary role is triggered because it'd output the scancode of the pressed key which is not the right thing when the secondary role is layer switching. --- right/src/usb_report_updater.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/right/src/usb_report_updater.c b/right/src/usb_report_updater.c index 5dad676..db2e382 100644 --- a/right/src/usb_report_updater.c +++ b/right/src/usb_report_updater.c @@ -178,8 +178,9 @@ void UpdateActiveUsbReports(void) // Trigger secondary role. if (!keyState->previous && secondaryRoleState == SecondaryRoleState_Pressed) { secondaryRoleState = SecondaryRoleState_Triggered; + } else { + applyKeyAction(keyState, action); } - applyKeyAction(keyState, action); } } else { if (keyState->suppressed) {