summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorBalz Guenat <balz.guenat@gmail.com>2017-08-11 18:53:08 +0200
committerJack Humbert <jack.humb@gmail.com>2017-08-11 22:54:10 +0200
commit897ceac26cd4ab4d4204e696bf0e94c7dd3914e0 (patch)
tree09ef7be063284e48a5c56c1dffd8c98d40ee5502 /quantum
parent88198a96066c926887f3102ddf43d9f513f25941 (diff)
downloadqmk_firmware-897ceac26cd4ab4d4204e696bf0e94c7dd3914e0.tar.gz
qmk_firmware-897ceac26cd4ab4d4204e696bf0e94c7dd3914e0.tar.xz
add option to let ctrl override shift/gui for the GRAVE_ESC.
This enables the ctrl+shift+esc shortcut to task manager on windows.
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 7a632d709..db52c782f 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -478,6 +478,11 @@ bool process_record_quantum(keyrecord_t *record) {
void (*method)(uint8_t) = (record->event.pressed) ? &add_key : &del_key;
uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)
|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)));
+
+#ifdef GRAVE_ESC_CTRL_OVERRIDE
+ if (get_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)))
+ shifted = 0;
+#endif
method(shifted ? KC_GRAVE : KC_ESCAPE);
send_keyboard_report();