diff options
Diffstat (limited to 'quantum/process_keycode/process_key_override.c')
-rw-r--r-- | quantum/process_keycode/process_key_override.c | 19 |
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; |