aboutsummaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorJason Stillwell <dragonfax@gmail.com>2018-03-16 13:41:01 -0700
committerJack Humbert <jack.humb@gmail.com>2018-03-16 16:41:01 -0400
commit00b4dce605bc44a2ee6babaf93dbe3640e735d2e (patch)
treef146f9f64439a7ea0b16bf91f5f7e89e172a4368 /quantum
parentbb5c98699fe622a8978c6fc62dc5829d227fdec5 (diff)
downloadfirmware-00b4dce605bc44a2ee6babaf93dbe3640e735d2e.tar.gz
firmware-00b4dce605bc44a2ee6babaf93dbe3640e735d2e.tar.bz2
firmware-00b4dce605bc44a2ee6babaf93dbe3640e735d2e.zip
Rule to enable Modifiers with Auto-Shift (#2542)
* Re-enable modifiers with auto-shift * Auto-shift modifiers rule * missed a line * Documentation * fixing whitespace
Diffstat (limited to 'quantum')
-rw-r--r--quantum/process_keycode/process_auto_shift.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c
index fcce91849..098bdeaa7 100644
--- a/quantum/process_keycode/process_auto_shift.c
+++ b/quantum/process_keycode/process_auto_shift.c
@@ -92,7 +92,9 @@ bool autoshift_state(void) {
}
bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
+#ifndef AUTO_SHIFT_MODIFIERS
static uint8_t any_mod_pressed;
+#endif
if (record->event.pressed) {
switch (keycode) {
@@ -175,6 +177,7 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
autoshift_flush();
if (!autoshift_enabled) return true;
+#ifndef AUTO_SHIFT_MODIFIERS
any_mod_pressed = get_mods() & (
MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|
MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)|
@@ -185,6 +188,7 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
if (any_mod_pressed) {
return true;
}
+#endif
autoshift_on(keycode);
return false;