1
0
Fork 0

Rule to enable Modifiers with Auto-Shift (#2542)

* Re-enable modifiers with auto-shift

* Auto-shift modifiers rule

* missed a line

* Documentation

* fixing whitespace
This commit is contained in:
Jason Stillwell 2018-03-16 13:41:01 -07:00 committed by Jack Humbert
parent bb5c98699f
commit 00b4dce605
3 changed files with 20 additions and 4 deletions

View file

@ -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;