summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorPascal Getreuer <50221757+getreuer@users.noreply.github.com>2022-05-19 17:39:00 -0700
committerGitHub <noreply@github.com>2022-05-20 01:39:00 +0100
commitb5608cbb6d8a5a24d9c3b928521acbc57726831f (patch)
treef163727a32169ca6a1093f83fdcc0ca0d0dfaa83 /quantum
parent36c8462f0a64e64a6ad832053368109f7c1ebf67 (diff)
downloadqmk_firmware-b5608cbb6d8a5a24d9c3b928521acbc57726831f.tar.gz
qmk_firmware-b5608cbb6d8a5a24d9c3b928521acbc57726831f.zip
Continue Caps Word when AltGr (right Alt) is held. (#17156)
This is a minor bug fix for Caps Word. Currently, Caps Word turns off whenever a non-shift mod becomes active. This is done to avoid interfering with hotkeys. This commit makes an exception to continue Caps Word when AltGr (right Alt) is held. Outside the US, the AltGr key is used to type additional symbols (https://en.wikipedia.org/wiki/AltGr_key). Depending on the language, these may include symbols used within words like accented letters where it would be desirable to continue Caps Word.
Diffstat (limited to 'quantum')
-rw-r--r--quantum/process_keycode/process_caps_word.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/process_keycode/process_caps_word.c b/quantum/process_keycode/process_caps_word.c
index 15238f04a1..ffd509a914 100644
--- a/quantum/process_keycode/process_caps_word.c
+++ b/quantum/process_keycode/process_caps_word.c
@@ -87,7 +87,7 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
return true;
}
- if (!(mods & ~MOD_MASK_SHIFT)) {
+ if (!(mods & ~(MOD_MASK_SHIFT | MOD_BIT(KC_RALT)))) {
switch (keycode) {
// Ignore MO, TO, TG, TT, and OSL layer switch keys.
case QK_MOMENTARY ... QK_MOMENTARY_MAX:
@@ -95,6 +95,9 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX:
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX:
+ // Ignore AltGr.
+ case KC_RALT:
+ case OSM(MOD_RALT):
return true;
#ifndef NO_ACTION_TAPPING