Add Mac centric Shift and Alt + GUI Macros (#13107)

Co-authored-by: filterpaper <filterpaper@localhost>
This commit is contained in:
Albert Y 2021-06-20 10:14:19 +08:00 committed by GitHub
parent d456963177
commit 7e832e46de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 28 deletions

View file

@ -381,26 +381,29 @@ See also: [Mouse Keys](feature_mouse_keys.md)
See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys) See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys)
|Key |Aliases |Description | |Key |Aliases |Description |
|----------|-------------------------------|------------------------------------------------------| |----------|----------------------------------|------------------------------------------------------|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | |`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift 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` | |`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` | |`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` | |`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` | |`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (AltGr) 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` | |`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` | |`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and Left GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | |`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | |`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` | |`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | |`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | |`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | |`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` | |`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|`KC_MEH` | |Left Control, Shift and Alt | |`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`KC_HYPR` | |Left Control, Shift, Alt and GUI | |`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 ## Mod-Tap Keys :id=mod-tap-keys
@ -417,7 +420,10 @@ See also: [Mod-Tap](mod_tap.md)
|`RSFT_T(kc)` | |Right Shift 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 (AltGr) 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 | |`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 | |`LSG_T(kc)` |`SGUI_T(kc)`, `SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|`LAG_T(kc)` | |Left Alt and GUI when held, `kc` when tapped |
|`RSG_T(kc)` | |Right Shift and GUI when held, `kc` when tapped |
|`RAG_T(kc)` | |Right Alt and GUI when held, `kc` when tapped |
|`LCA_T(kc)` | |Left Control and Alt 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 | |`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped |
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | |`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |

View file

@ -37,7 +37,10 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|`RSFT_T(kc)`| |Right Shift 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 | |`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 | |`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 | |`LSG_T(kc)` |`SGUI_T(kc)`, `SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|`LAG_T(kc)` | |Left Alt and GUI when held, `kc` when tapped |
|`RSG_T(kc)` | |Right Shift and GUI when held, `kc` when tapped |
|`RAG_T(kc)` | |Right Alt and GUI when held, `kc` when tapped |
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | |`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped | |`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped |
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | |`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |

View file

@ -538,9 +538,13 @@ enum quantum_keycodes {
#define HYPR(kc) (QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI | (kc)) #define HYPR(kc) (QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI | (kc))
#define MEH(kc) (QK_LCTL | QK_LSFT | QK_LALT | (kc)) #define MEH(kc) (QK_LCTL | QK_LSFT | QK_LALT | (kc))
#define LCAG(kc) (QK_LCTL | QK_LALT | QK_LGUI | (kc)) #define LCAG(kc) (QK_LCTL | QK_LALT | QK_LGUI | (kc))
#define SGUI(kc) (QK_LGUI | QK_LSFT | (kc)) #define LSG(kc) (QK_LSFT | QK_LGUI | (kc))
#define SCMD(kc) SGUI(kc) #define SGUI(kc) LSG(kc)
#define SWIN(kc) SGUI(kc) #define SCMD(kc) LSG(kc)
#define SWIN(kc) LSG(kc)
#define LAG(kc) (QK_LALT | QK_LGUI | (kc))
#define RSG(kc) (QK_RSFT | QK_RGUI | (kc))
#define RAG(kc) (QK_RALT | QK_RGUI | (kc))
#define LCA(kc) (QK_LCTL | QK_LALT | (kc)) #define LCA(kc) (QK_LCTL | QK_LALT | (kc))
#define LSA(kc) (QK_LSFT | QK_LALT | (kc)) #define LSA(kc) (QK_LSFT | QK_LALT | (kc))
#define RSA(kc) (QK_RSFT | QK_RALT | (kc)) #define RSA(kc) (QK_RSFT | QK_RALT | (kc))
@ -765,9 +769,13 @@ enum quantum_keycodes {
#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI #define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI
#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI #define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI
#define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ #define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI #define LSG_T(kc) MT(MOD_LSFT | MOD_LGUI, kc) // Left Shift + GUI
#define SCMD_T(kc) SGUI_T(kc) #define SGUI_T(kc) LSG_T(kc)
#define SWIN_T(kc) SGUI_T(kc) #define SCMD_T(kc) LSG_T(kc)
#define SWIN_T(kc) LSG_T(kc)
#define LAG_T(kc) MT(MOD_LALT | MOD_LGUI, kc) // Left Alt + GUI
#define RSG_T(kc) MT(MOD_RSFT | MOD_RGUI, kc) // Right Shift + GUI
#define RAG_T(kc) MT(MOD_RALT | MOD_RGUI, kc) // Right Alt + GUI
#define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt
#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) // Left Shift + Alt #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 RSA_T(kc) MT(MOD_RSFT | MOD_RALT, kc) // Right Shift + Alt