Skip to content

Commit

Permalink
add option to let ctrl override shift/gui for the GRAVE_ESC.
Browse files Browse the repository at this point in the history
This enables the ctrl+shift+esc shortcut to task manager on windows.
BalzGuenat authored and jackhumbert committed Aug 11, 2017
1 parent 88198a9 commit 897ceac
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions keyboards/bananasplit/keymaps/coloneljesus/config.h
Original file line number Diff line number Diff line change
@@ -20,5 +20,6 @@
#include "../../config.h"

// place overrides here
#define GRAVE_ESC_CTRL_OVERRIDE

#endif
5 changes: 5 additions & 0 deletions quantum/quantum.c
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 897ceac

Please sign in to comment.