Skip to content

Commit 3663620

Browse files
authored
Clean up mod & mod-tap shortcuts (#25399)
1 parent 89e39b9 commit 3663620

5 files changed

Lines changed: 206 additions & 140 deletions

File tree

docs/feature_advanced_keycodes.md

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,40 @@
22

33
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
44

5-
|Key |Aliases |Description |
6-
|----------|----------------------------------|------------------------------------------------------|
7-
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
8-
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
9-
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
10-
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
11-
|`RCTL(kc)`| |Hold Right Control and press `kc` |
12-
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
13-
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
14-
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
15-
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
16-
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
17-
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
18-
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
19-
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
20-
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
21-
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
22-
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
23-
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
24-
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
25-
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
26-
27-
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
5+
|Key |Aliases |Description |
6+
|----------|----------------------------------|-------------------------------------------------------------------------------|
7+
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
8+
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
9+
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
10+
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
11+
|`LCS(kc)` | |Hold Left Control and Left Shift and press `kc` |
12+
|`LCA(kc)` | |Hold Left Control and Left Alt and press `kc` |
13+
|`LCG(kc)` | |Hold Left Control and Left GUI and press `kc` |
14+
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
15+
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and Left GUI and press `kc` |
16+
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
17+
|`LCSG(kc)`| |Hold Left Control, Left Shift and Left GUI and press `kc` |
18+
|`LCAG(kc)`| |Hold Left Control, Left Alt and Left GUI and press `kc` |
19+
|`LSAG(kc)`| |Hold Left Shift, Left Alt and Left GUI and press `kc` |
20+
|`RCTL(kc)`| |Hold Right Control and press `kc` |
21+
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
22+
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
23+
|`RGUI(kc)`|`RCMD(kc)`, `RWIN(kc)` |Hold Right GUI and press `kc` |
24+
|`RCA(kc)` | |Hold Right Control and Right Alt and press `kc` |
25+
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
26+
|`RCG(kc)` | |Hold Right Control and Right GUI and press `kc` |
27+
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt and press `kc` |
28+
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
29+
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
30+
|`RCSG(kc)`| |Hold Right Control, Right Shift and Right GUI and press `kc` |
31+
|`RCAG(kc)`| |Hold Right Control, Right Alt and Right GUI and press `kc` |
32+
|`RSAG(kc)`| |Hold Right Shift, Right Alt and Right GUI and press `kc` |
33+
|`MEH(kc)` | |Hold Left Control, Left Shift and Left Alt and press `kc` |
34+
|`HYPR(kc)`| |Hold Left Control, Left Shift, Left Alt and Left GUI and press `kc`<sup>1</sup>|
35+
36+
<sup>1. More information on the Hyper key can be found on [this blog post by Brett Terpstra](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/).</sup>
37+
38+
You can also chain them, for example `LCTL(LALT(KC_DEL))`, `C(A(KC_DEL))`, or `LCA(KC_DEL)` all make a key that sends Control+Alt+Delete with a single keypress.
2839

2940
# Checking Modifier State {#checking-modifier-state}
3041

0 commit comments

Comments
 (0)