From dd6303b7477ace43a4c030d7b7c5f9539d3fc931 Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Wed, 5 Aug 2020 12:34:21 -0400 Subject: [PATCH 1/7] Issue 9942: Add Quantum defines Add codes to quantum_keycodes for LSA, RSA, RCS, and their corresponding _T macros --- quantum/quantum_keycodes.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index d8f1fa4bbbc2..421be1756b79 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -540,6 +540,9 @@ enum quantum_keycodes { #define SCMD(kc) SGUI(kc) #define SWIN(kc) SGUI(kc) #define LCA(kc) (QK_LCTL | QK_LALT | (kc)) +#define LSA(kc) (QK_LSFT | QK_LALT | (kc)) +#define RSA(kc) (QK_RSFT | QK_RALT | (kc)) +#define RCS(kc) (QK_RCTL | QK_RSFT | (kc)) #define MOD_HYPR 0xF #define MOD_MEH 0x7 @@ -763,6 +766,10 @@ enum quantum_keycodes { #define SCMD_T(kc) SGUI_T(kc) #define SWIN_T(kc) SGUI_T(kc) #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) // Left Alt + Left Shift, used for vertical text selection and keyboard language-switching +#define RSA_T(kc) MT(MOD_RSFT | MOD_RALT, kc) // Right Alt + Shift, used by many locales for special characters +#define RCS_T(kc) MT(MOD_RCTL | MOD_RSFT, kc) // Right Control + Shift, used by some locales for special characters + #define ALL_T(kc) HYPR_T(kc) // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap From 9ff50775465e897eeee4e935709c5cf08db3a7b2 Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Wed, 5 Aug 2020 13:04:40 -0400 Subject: [PATCH 2/7] 9942: Add documentation for new defines Add documentation for new defines in feature request 9942. Also define SAGR and SAGR_T as aliases for RSA and RSA_T. --- docs/keycodes.md | 74 ++++++++++++++++++++------------------ quantum/quantum_keycodes.h | 2 ++ 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 5fbc8f4fa6b8..e34a76b34a06 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -381,45 +381,51 @@ See also: [Mouse Keys](feature_mouse_keys.md) See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys) -|Key |Aliases |Description | -|----------|-------------------------------|----------------------------------------------------| -|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | -|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | -|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | -|`RCTL(kc)`| |Hold Right Control and press `kc` | -|`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | -|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | -|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | -|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | -|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | -|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | -|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| -|`KC_MEH` | |Left Control, Shift and Alt | -|`KC_HYPR` | |Left Control, Shift, Alt and GUI | +|Key |Aliases |Description | +|----------|-------------------------------|------------------------------------------------------| +|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (Alt Gr) and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | +|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (Alt Gr) and press `kc`| +|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` | +|`KC_MEH` | |Left Control, Shift and Alt | +|`KC_HYPR` | |Left Control, Shift, Alt and GUI | ## Mod-Tap Keys :id=mod-tap-keys See also: [Mod-Tap](mod_tap.md) -|Key |Aliases |Description | -|-------------|-----------------------------------------------------------------|-------------------------------------------------------| -|`MT(mod, kc)`| |`mod` when held, `kc` when tapped | -|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`LALT_T(kc)` |`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | -|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | -|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped | -|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | -|`LCAG_T(kc)` | |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)` | |Right Control, Alt and GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|Key |Aliases |Description | +|-------------|-----------------------------------------------------------------|--------------------------------------------------------------| +|`MT(mod, kc)`| |`mod` when held, `kc` when tapped | +|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`LALT_T(kc)` |`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | +|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped | +|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | +|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (Alt Gr) when held, `kc` when tapped | +|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped | +|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (Alt Gr) when held, `kc` when tapped| +|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped | +|`LCAG_T(kc)` | |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)` | |Right Control, Alt and GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped | |`HYPR_T(kc)` |`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| ## RGB Lighting :id=rgb-lighting diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 421be1756b79..823e2a9cc8fb 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -543,6 +543,7 @@ enum quantum_keycodes { #define LSA(kc) (QK_LSFT | QK_LALT | (kc)) #define RSA(kc) (QK_RSFT | QK_RALT | (kc)) #define RCS(kc) (QK_RCTL | QK_RSFT | (kc)) +#define SAGR(kc) RSA(kc) #define MOD_HYPR 0xF #define MOD_MEH 0x7 @@ -769,6 +770,7 @@ enum quantum_keycodes { #define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) // Left Alt + Left Shift, used for vertical text selection and keyboard language-switching #define RSA_T(kc) MT(MOD_RSFT | MOD_RALT, kc) // Right Alt + Shift, used by many locales for special characters #define RCS_T(kc) MT(MOD_RCTL | MOD_RSFT, kc) // Right Control + Shift, used by some locales for special characters +#define SAGR_T(kc) RSA_T(kc) // Shift + Alt Gr nickname #define ALL_T(kc) HYPR_T(kc) From 3005212177c4e31cae52990eb954864e77ff99e6 Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Wed, 12 Aug 2020 11:35:20 -0400 Subject: [PATCH 3/7] Update quantum/quantum_keycodes.h Co-authored-by: Ryan --- quantum/quantum_keycodes.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 823e2a9cc8fb..437921aeb1af 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -767,10 +767,10 @@ enum quantum_keycodes { #define SCMD_T(kc) SGUI_T(kc) #define SWIN_T(kc) SGUI_T(kc) #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt -#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) // Left Alt + Left Shift, used for vertical text selection and keyboard language-switching -#define RSA_T(kc) MT(MOD_RSFT | MOD_RALT, kc) // Right Alt + Shift, used by many locales for special characters -#define RCS_T(kc) MT(MOD_RCTL | MOD_RSFT, kc) // Right Control + Shift, used by some locales for special characters -#define SAGR_T(kc) RSA_T(kc) // Shift + Alt Gr nickname +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) // Left Shift + Alt +#define RSA_T(kc) MT(MOD_RSFT | MOD_RALT, kc) // Right Shift + Alt +#define RCS_T(kc) MT(MOD_RCTL | MOD_RSFT, kc) // Right Control + Shift +#define SAGR_T(kc) RSA_T(kc) #define ALL_T(kc) HYPR_T(kc) From 489cf302a4e91ca553106e4ddea4614842a5a565 Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Wed, 12 Aug 2020 11:43:50 -0400 Subject: [PATCH 4/7] Update docs/keycodes.md Co-authored-by: Ryan --- docs/keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index e34a76b34a06..8a8a6c3bbaf6 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -415,7 +415,7 @@ See also: [Mod-Tap](mod_tap.md) |`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | |`RCTL_T(kc)` | |Right Control when held, `kc` when tapped | |`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (Alt Gr) when held, `kc` when tapped | +|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (AltGr) when held, `kc` when tapped | |`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | |`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | |`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | From ed7b8ee82ad3b334db4b4993fd19da7abe8a5cbc Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Wed, 12 Aug 2020 11:44:00 -0400 Subject: [PATCH 5/7] Update docs/keycodes.md Co-authored-by: Ryan --- docs/keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 8a8a6c3bbaf6..9b216b43e3e4 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -420,7 +420,7 @@ See also: [Mod-Tap](mod_tap.md) |`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | |`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | |`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped | -|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (Alt Gr) when held, `kc` when tapped| +|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | |`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped | |`LCAG_T(kc)` | |Left Control, Alt and GUI when held, `kc` when tapped | |`RCAG_T(kc)` | |Right Control, Alt and GUI when held, `kc` when tapped | From 3844ac8a31e549d7d09460aedd0510bdd346aaa1 Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Wed, 12 Aug 2020 11:44:08 -0400 Subject: [PATCH 6/7] Update docs/keycodes.md Co-authored-by: Ryan --- docs/keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 9b216b43e3e4..48d670cec20d 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -394,7 +394,7 @@ See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys) |`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | |`LCA(kc)` | |Hold Left Control and Alt and press `kc` | |`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | -|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (Alt Gr) and press `kc`| +|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` | |`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | |`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | |`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | From 134757d47c7c85337218a7bdf0ba0c1be59db325 Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Wed, 12 Aug 2020 11:44:15 -0400 Subject: [PATCH 7/7] Update docs/keycodes.md Co-authored-by: Ryan --- docs/keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 48d670cec20d..c6403c80bc4f 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -389,7 +389,7 @@ See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys) |`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | |`RCTL(kc)`| |Hold Right Control and press `kc` | |`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (Alt Gr) and press `kc` | +|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (AltGr) and press `kc` | |`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | |`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | |`LCA(kc)` | |Hold Left Control and Alt and press `kc` |