summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_key_override.c
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-08-29 21:24:43 +1000
committerNick Brassel <nick@tzarc.org>2023-08-29 21:24:43 +1000
commit31a91add168c956655ace8ec4cf9750db1e2cfc6 (patch)
tree12cea9b5f8e769f9611a31cbaede9537edad71cc /quantum/process_keycode/process_key_override.c
parentf07490bc092e365ba03dc685b3fc30ad0bf0b752 (diff)
parentedaf8a87ef3164f8986b0a8eb171d4879b45414c (diff)
Merge branch 'develop'
Diffstat (limited to 'quantum/process_keycode/process_key_override.c')
-rw-r--r--quantum/process_keycode/process_key_override.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c
index 17e490e67a..264e2562b8 100644
--- a/quantum/process_keycode/process_key_override.c
+++ b/quantum/process_keycode/process_key_override.c
@@ -15,12 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "quantum.h"
+#include "process_key_override.h"
#include "report.h"
#include "timer.h"
-#include "process_key_override.h"
-
-#include <debug.h>
+#include "debug.h"
+#include "wait.h"
+#include "action_util.h"
+#include "quantum.h"
+#include "quantum_keycodes.h"
#ifndef KEY_OVERRIDE_REPEAT_DELAY
# define KEY_OVERRIDE_REPEAT_DELAY 500
@@ -322,6 +324,15 @@ static bool try_activating_override(const uint16_t keycode, const uint8_t layer,
clear_active_override(false);
+#ifdef DUMMY_MOD_NEUTRALIZER_KEYCODE
+ // Send a dummy keycode before unregistering the modifier(s)
+ // so that suppressing the modifier(s) doesn't falsely get interpreted
+ // by the host OS as a tap of a modifier key.
+ // For example, unintended activations of the start menu on Windows when
+ // using a GUI+<kc> key override with suppressed mods.
+ neutralize_flashing_modifiers(active_mods);
+#endif
+
active_override = override;
active_override_trigger_is_down = true;