diff options
| author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2021-06-20 10:14:19 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-19 19:14:19 -0700 |
| commit | 7e832e46de26989b81f2fbf58a0f391b2b0c1aaf (patch) | |
| tree | 95e4b7b6bd9a7629808d68ff2c0a810a229d0417 | |
| parent | d456963177b9d3639c2eb14b932d2e601b04973f (diff) | |
| download | qmk_firmware-7e832e46de26989b81f2fbf58a0f391b2b0c1aaf.tar.gz qmk_firmware-7e832e46de26989b81f2fbf58a0f391b2b0c1aaf.zip | |
Add Mac centric Shift and Alt + GUI Macros (#13107)
Co-authored-by: filterpaper <filterpaper@localhost>
| -rw-r--r-- | docs/keycodes.md | 48 | ||||
| -rw-r--r-- | docs/mod_tap.md | 5 | ||||
| -rw-r--r-- | quantum/quantum_keycodes.h | 20 |
3 files changed, 45 insertions, 28 deletions
diff --git a/docs/keycodes.md b/docs/keycodes.md index f3c519b13..1e9f34774 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md | |||
| @@ -381,26 +381,29 @@ See also: [Mouse Keys](feature_mouse_keys.md) | |||
| 381 | 381 | ||
| 382 | See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys) | 382 | See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys) |
| 383 | 383 | ||
| 384 | |Key |Aliases |Description | | 384 | |Key |Aliases |Description | |
| 385 | |----------|-------------------------------|------------------------------------------------------| | 385 | |----------|----------------------------------|------------------------------------------------------| |
| 386 | |`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | | 386 | |`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | |
| 387 | |`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | | 387 | |`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | |
| 388 | |`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | | 388 | |`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | |
| 389 | |`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | | 389 | |`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` | |
| 390 | |`RCTL(kc)`| |Hold Right Control and press `kc` | | 390 | |`RCTL(kc)`| |Hold Right Control and press `kc` | |
| 391 | |`RSFT(kc)`| |Hold Right Shift and press `kc` | | 391 | |`RSFT(kc)`| |Hold Right Shift and press `kc` | |
| 392 | |`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (AltGr) and press `kc` | | 392 | |`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (AltGr) and press `kc` | |
| 393 | |`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | | 393 | |`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | |
| 394 | |`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | | 394 | |`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and Left GUI and press `kc` | |
| 395 | |`LCA(kc)` | |Hold Left Control and Alt and press `kc` | | 395 | |`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` | |
| 396 | |`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | | 396 | |`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` | |
| 397 | |`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` | | 397 | |`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` | |
| 398 | |`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | | 398 | |`LCA(kc)` | |Hold Left Control and Alt and press `kc` | |
| 399 | |`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | | 399 | |`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | |
| 400 | |`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | | 400 | |`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` | |
| 401 | |`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` | | 401 | |`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | |
| 402 | |`KC_MEH` | |Left Control, Shift and Alt | | 402 | |`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | |
| 403 | |`KC_HYPR` | |Left Control, Shift, Alt and GUI | | 403 | |`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | |
| 404 | |`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` | | ||
| 405 | |`KC_MEH` | |Left Control, Shift and Alt | | ||
| 406 | |`KC_HYPR` | |Left Control, Shift, Alt and GUI | | ||
| 404 | 407 | ||
| 405 | ## Mod-Tap Keys :id=mod-tap-keys | 408 | ## Mod-Tap Keys :id=mod-tap-keys |
| 406 | 409 | ||
| @@ -417,7 +420,10 @@ See also: [Mod-Tap](mod_tap.md) | |||
| 417 | |`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | | 420 | |`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | |
| 418 | |`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (AltGr) when held, `kc` when tapped | | 421 | |`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (AltGr) when held, `kc` when tapped | |
| 419 | |`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | | 422 | |`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | |
| 420 | |`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | | 423 | |`LSG_T(kc)` |`SGUI_T(kc)`, `SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | |
| 424 | |`LAG_T(kc)` | |Left Alt and GUI when held, `kc` when tapped | | ||
| 425 | |`RSG_T(kc)` | |Right Shift and GUI when held, `kc` when tapped | | ||
| 426 | |`RAG_T(kc)` | |Right Alt and GUI when held, `kc` when tapped | | ||
| 421 | |`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | | 427 | |`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | |
| 422 | |`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped | | 428 | |`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped | |
| 423 | |`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | | 429 | |`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | |
diff --git a/docs/mod_tap.md b/docs/mod_tap.md index 6a2bcbc15..f4d128482 100644 --- a/docs/mod_tap.md +++ b/docs/mod_tap.md | |||
| @@ -37,7 +37,10 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations | |||
| 37 | |`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | | 37 | |`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | |
| 38 | |`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | | 38 | |`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | |
| 39 | |`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | | 39 | |`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | |
| 40 | |`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | | 40 | |`LSG_T(kc)` |`SGUI_T(kc)`, `SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | |
| 41 | |`LAG_T(kc)` | |Left Alt and GUI when held, `kc` when tapped | | ||
| 42 | |`RSG_T(kc)` | |Right Shift and GUI when held, `kc` when tapped | | ||
| 43 | |`RAG_T(kc)` | |Right Alt and GUI when held, `kc` when tapped | | ||
| 41 | |`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | | 44 | |`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | |
| 42 | |`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped | | 45 | |`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped | |
| 43 | |`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | | 46 | |`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | |
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 316c20fce..c361dd670 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
| @@ -538,9 +538,13 @@ enum quantum_keycodes { | |||
| 538 | #define HYPR(kc) (QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI | (kc)) | 538 | #define HYPR(kc) (QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI | (kc)) |
| 539 | #define MEH(kc) (QK_LCTL | QK_LSFT | QK_LALT | (kc)) | 539 | #define MEH(kc) (QK_LCTL | QK_LSFT | QK_LALT | (kc)) |
| 540 | #define LCAG(kc) (QK_LCTL | QK_LALT | QK_LGUI | (kc)) | 540 | #define LCAG(kc) (QK_LCTL | QK_LALT | QK_LGUI | (kc)) |
| 541 | #define SGUI(kc) (QK_LGUI | QK_LSFT | (kc)) | 541 | #define LSG(kc) (QK_LSFT | QK_LGUI | (kc)) |
| 542 | #define SCMD(kc) SGUI(kc) | 542 | #define SGUI(kc) LSG(kc) |
| 543 | #define SWIN(kc) SGUI(kc) | 543 | #define SCMD(kc) LSG(kc) |
| 544 | #define SWIN(kc) LSG(kc) | ||
| 545 | #define LAG(kc) (QK_LALT | QK_LGUI | (kc)) | ||
| 546 | #define RSG(kc) (QK_RSFT | QK_RGUI | (kc)) | ||
| 547 | #define RAG(kc) (QK_RALT | QK_RGUI | (kc)) | ||
| 544 | #define LCA(kc) (QK_LCTL | QK_LALT | (kc)) | 548 | #define LCA(kc) (QK_LCTL | QK_LALT | (kc)) |
| 545 | #define LSA(kc) (QK_LSFT | QK_LALT | (kc)) | 549 | #define LSA(kc) (QK_LSFT | QK_LALT | (kc)) |
| 546 | #define RSA(kc) (QK_RSFT | QK_RALT | (kc)) | 550 | #define RSA(kc) (QK_RSFT | QK_RALT | (kc)) |
| @@ -765,9 +769,13 @@ enum quantum_keycodes { | |||
| 765 | #define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI | 769 | #define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI |
| 766 | #define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI | 770 | #define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI |
| 767 | #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/ | 771 | #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/ |
| 768 | #define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI | 772 | #define LSG_T(kc) MT(MOD_LSFT | MOD_LGUI, kc) // Left Shift + GUI |
| 769 | #define SCMD_T(kc) SGUI_T(kc) | 773 | #define SGUI_T(kc) LSG_T(kc) |
| 770 | #define SWIN_T(kc) SGUI_T(kc) | 774 | #define SCMD_T(kc) LSG_T(kc) |
| 775 | #define SWIN_T(kc) LSG_T(kc) | ||
| 776 | #define LAG_T(kc) MT(MOD_LALT | MOD_LGUI, kc) // Left Alt + GUI | ||
| 777 | #define RSG_T(kc) MT(MOD_RSFT | MOD_RGUI, kc) // Right Shift + GUI | ||
| 778 | #define RAG_T(kc) MT(MOD_RALT | MOD_RGUI, kc) // Right Alt + GUI | ||
| 771 | #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt | 779 | #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt |
| 772 | #define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) // Left Shift + Alt | 780 | #define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) // Left Shift + Alt |
| 773 | #define RSA_T(kc) MT(MOD_RSFT | MOD_RALT, kc) // Right Shift + Alt | 781 | #define RSA_T(kc) MT(MOD_RSFT | MOD_RALT, kc) // Right Shift + Alt |
