You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* Fix Caps Word to treat mod-taps more consistently.
Previously, holding any mod-tap key while Caps Word is active stops Caps
Word, and this happens regardless of `caps_word_press_user()`. Yet for
regular mod keys, AltGr (KC_RALT) is ignored, Shift keys are passed to
`caps_word_press_user()` to determine whether to continue, and
similarly, a key `RSFT(KC_RALT)` representing Right Shift + Alt is
passed to `caps_word_press_user()` to determine whether to continue.
This commit makes held mod-tap keys consistent with regular mod keys:
* Holding a `RALT_T` mod-tap is ignored.
* When holding a shift mod-tap key, `KC_LSFT` or `KC_RSFT` is passed to
`caps_word_press_user()` to determine whether to continue.
* When holding a Right Shift + Alt (`RSA_T`) mod-tap, `RSFT(KC_RALT)` is
passed to `caps_word_press_user()`.
Particularly, with this fix a user may choose to continue Caps Word when
a shift mod-tap key is held by adding `KC_LSFT` and `KC_RSFT` cases in
`caps_word_press_user()`. For instance as
```
bool caps_word_press_user(uint16_t keycode) {
switch (keycode) {
// Keycodes that continue Caps Word, with shift applied.
case KC_A ... KC_Z:
case KC_MINS:
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key.
return true;
// Keycodes that continue Caps Word, without shifting.
case KC_1 ... KC_0:
case KC_BSPC:
case KC_DEL:
case KC_UNDS:
case KC_LSFT: // <<< Added here.
case KC_RSFT:
return true;
default:
return false; // Deactivate Caps Word.
}
}
```
* Fix Caps Word to treat mod-taps more consistently.
Previously, holding any mod-tap key while Caps Word is active stops Caps
Word, and this happens regardless of `caps_word_press_user()`. Yet for
regular mod keys, AltGr (KC_RALT) is ignored, Shift keys are passed to
`caps_word_press_user()` to determine whether to continue, and
similarly, a key `RSFT(KC_RALT)` representing Right Shift + Alt is
passed to `caps_word_press_user()` to determine whether to continue.
This commit makes held mod-tap keys consistent with regular mod keys:
* Holding a `RALT_T` mod-tap is ignored.
* When holding a shift mod-tap key, `KC_LSFT` or `KC_RSFT` is passed to
`caps_word_press_user()` to determine whether to continue.
* When holding a Right Shift + Alt (`RSA_T`) mod-tap, `RSFT(KC_RALT)` is
passed to `caps_word_press_user()`.
Particularly, with this fix a user may choose to continue Caps Word when
a shift mod-tap key is held by adding `KC_LSFT` and `KC_RSFT` cases in
`caps_word_press_user()`. For instance as
```
bool caps_word_press_user(uint16_t keycode) {
switch (keycode) {
// Keycodes that continue Caps Word, with shift applied.
case KC_A ... KC_Z:
case KC_MINS:
add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to the next key.
return true;
// Keycodes that continue Caps Word, without shifting.
case KC_1 ... KC_0:
case KC_BSPC:
case KC_DEL:
case KC_UNDS:
case KC_LSFT: // <<< Added here.
case KC_RSFT:
return true;
default:
return false; // Deactivate Caps Word.
}
}
```
* Update quantum/process_keycode/process_caps_word.c
Co-authored-by: Joel Challis <git@zvecr.com>
|
3 years ago | |
|---|---|---|
| .. | ||
| audio | 4 years ago | |
| backlight | 4 years ago | |
| bootmagic | ||
| debounce | 3 years ago | |
| encoder/tests | ||
| keymap_extras | 3 years ago | |
| led_matrix | 3 years ago | |
| logging | 3 years ago | |
| painter | 3 years ago | |
| pointing_device | 3 years ago | |
| process_keycode | 3 years ago | |
| rgb_matrix | 3 years ago | |
| rgblight | 4 years ago | |
| send_string | 3 years ago | |
| sequencer | ||
| split_common | 3 years ago | |
| wear_leveling | 3 years ago | |
| action.c | 4 years ago | |
| action.h | ||
| action_code.h | 3 years ago | |
| action_layer.c | ||
| action_layer.h | 4 years ago | |
| action_tapping.c | 4 years ago | |
| action_tapping.h | 4 years ago | |
| action_util.c | 4 years ago | |
| action_util.h | ||
| bitwise.c | ||
| bitwise.h | ||
| caps_word.c | 4 years ago | |
| caps_word.h | 4 years ago | |
| color.c | ||
| color.h | ||
| command.c | 3 years ago | |
| command.h | 3 years ago | |
| config_common.h | ||
| crc.c | ||
| crc.h | ||
| debounce.h | 3 years ago | |
| deferred_exec.c | ||
| deferred_exec.h | ||
| digitizer.c | ||
| digitizer.h | ||
| dip_switch.c | ||
| dip_switch.h | ||
| dynamic_keymap.c | 3 years ago | |
| dynamic_keymap.h | ||
| dynamic_macro.h | ||
| eeconfig.c | 4 years ago | |
| eeconfig.h | 4 years ago | |
| encoder.c | 3 years ago | |
| encoder.h | ||
| haptic.c | 4 years ago | |
| haptic.h | ||
| joystick.c | 4 years ago | |
| joystick.h | 4 years ago | |
| keyboard.c | 3 years ago | |
| keyboard.h | 3 years ago | |
| keycode.h | ||
| keycode_config.c | 3 years ago | |
| keycode_config.h | 3 years ago | |
| keycode_legacy.h | ||
| keymap.h | 3 years ago | |
| keymap_common.c | 3 years ago | |
| keymap_introspection.c | 3 years ago | |
| keymap_introspection.h | 4 years ago | |
| led.c | 3 years ago | |
| led.h | 3 years ago | |
| led_tables.c | ||
| led_tables.h | ||
| main.c | 4 years ago | |
| matrix.c | 3 years ago | |
| matrix.h | ||
| matrix_common.c | 3 years ago | |
| mousekey.c | 3 years ago | |
| mousekey.h | 3 years ago | |
| programmable_button.c | ||
| programmable_button.h | ||
| quantum.c | 3 years ago | |
| quantum.h | 3 years ago | |
| quantum_keycodes.h | 3 years ago | |
| quantum_keycodes_legacy.h | 4 years ago | |
| raw_hid.h | ||
| ring_buffer.h | ||
| secure.c | 4 years ago | |
| secure.h | 4 years ago | |
| sync_timer.c | ||
| sync_timer.h | ||
| utf8.c | 4 years ago | |
| utf8.h | 4 years ago | |
| util.h | ||
| variable_trace.c | ||
| variable_trace.h | ||
| velocikey.c | ||
| velocikey.h | ||
| via.c | 3 years ago | |
| via.h | 3 years ago | |
| via_ensure_keycode.h | ||
| virtser.h | ||
| wpm.c | ||
| wpm.h | ||