summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2025-07-06 16:57:51 +1000
committerGitHub <noreply@github.com>2025-07-06 16:57:51 +1000
commitba63bac661c3c6154f3b42a85167b3552d29f0f8 (patch)
tree3b507525ecf973c2011d3a47e52d759c4b13c71e /docs
parent90b5c170347e7a46a8f56628a9830ea5a719a326 (diff)
Add short aliases for `OSM()` (#25443)
Diffstat (limited to 'docs')
-rw-r--r--docs/keycodes.md43
-rw-r--r--docs/one_shot_keys.md48
2 files changed, 78 insertions, 13 deletions
diff --git a/docs/keycodes.md b/docs/keycodes.md
index 5d983e347e..33014a54a5 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -404,7 +404,6 @@ See also: [Layer Switching](feature_layers#switching-and-toggling-layers)
404|`DF(layer)` |Set the base (default) layer until the keyboard loses power | 404|`DF(layer)` |Set the base (default) layer until the keyboard loses power |
405|`PDF(layer)` |Set the base (default) layer in EEPROM | 405|`PDF(layer)` |Set the base (default) layer in EEPROM |
406|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)| 406|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
407|`OSL(layer)` |Momentarily activates `layer` until a key is pressed. See [One Shot Keys](one_shot_keys) for details. |
408|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](mod_tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`| 407|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](mod_tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`|
409|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped | 408|`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped |
410|`TG(layer)` |Toggle `layer` on or off | 409|`TG(layer)` |Toggle `layer` on or off |
@@ -817,13 +816,41 @@ See also: [US ANSI Shifted Symbols](keycodes_us_ansi_shifted)
817 816
818See also: [One Shot Keys](one_shot_keys) 817See also: [One Shot Keys](one_shot_keys)
819 818
820|Key |Aliases |Description | 819|Key |Aliases |Description |
821|--------------------|---------|----------------------------------| 820|--------------------|---------|---------------------------------------------------------------------|
822|`OSM(mod)` | |Hold `mod` for one keypress | 821|`QK_ONE_SHOT_TOGGLE`|`OS_TOGG`|Toggles One Shot keys status |
823|`OSL(layer)` | |Switch to `layer` for one keypress| 822|`QK_ONE_SHOT_ON` |`OS_ON` |Turns One Shot keys on |
824|`QK_ONE_SHOT_TOGGLE`|`OS_TOGG`|Toggles One Shot keys status | 823|`QK_ONE_SHOT_OFF` |`OS_OFF` |Turns One Shot keys off |
825|`QK_ONE_SHOT_ON` |`OS_ON` |Turns One Shot keys on | 824|`OSL(layer)` | |Switch to `layer` for one keypress |
826|`QK_ONE_SHOT_OFF` |`OS_OFF` |Turns One Shot keys off | 825|`OSM(mod)` | |Hold `mod` for one keypress |
826|`OS_LCTL` | |Hold Left Control for one keypress |
827|`OS_LSFT` | |Hold Left Shift for one keypress |
828|`OS_LALT` | |Hold Left Alt for one keypress |
829|`OS_LGUI` | |Hold Left GUI for one keypress |
830|`OS_LCS` | |Hold Left Control and Left Shift for one keypress |
831|`OS_LCA` | |Hold Left Control and left Alt for one keypress |
832|`OS_LCG` | |Hold Left Control and Left GUI for one keypress |
833|`OS_LSA` | |Hold Left Shift and Left Alt for one keypress |
834|`OS_LSG` | |Hold Left Shift and Left GUI for one keypress |
835|`OS_LAG` | |Hold Left Alt and Left GUI for one keypress |
836|`OS_LCSG` | |Hold Left Control, Left Shift and Left GUI for one keypress |
837|`OS_LCAG` | |Hold Left Control, Left Alt and Left GUI for one keypress |
838|`OS_LSAG` | |Hold Left Shift, Left Alt and Left GUI for one keypress |
839|`OS_RCTL` | |Hold Right Control for one keypress |
840|`OS_RSFT` | |Hold Right Shift for one keypress |
841|`OS_RALT` | |Hold Right Alt for one keypress |
842|`OS_RGUI` | |Hold Right GUI for one keypress |
843|`OS_RCS` | |Hold Right Control and Right Shift for one keypress |
844|`OS_RCA` | |Hold Right Control and Right Alt for one keypress |
845|`OS_RCG` | |Hold Right Control and Right GUI for one keypress |
846|`OS_RSA` | |Hold Right Shift and Right Alt for one keypress |
847|`OS_RSG` | |Hold Right Shift and Right GUI for one keypress |
848|`OS_RAG` | |Hold Right Alt and Right GUI for one keypress |
849|`OS_RCSG` | |Hold Right Control, Right Shift and Right GUI for one keypress |
850|`OS_RCAG` | |Hold Right Control, Right Alt and Right GUI for one keypress |
851|`OS_RSAG` | |Hold Right Shift, Right Alt and Right GUI for one keypress |
852|`OS_MEH` | |Hold Left Control, Left Shift and Left Alt for one keypress |
853|`OS_HYPR` | |Hold Left Control, Left Shift, Left Alt and Left GUI for one keypress|
827 854
828## Programmable Button Support {#programmable-button} 855## Programmable Button Support {#programmable-button}
829 856
diff --git a/docs/one_shot_keys.md b/docs/one_shot_keys.md
index 140c8de475..c4d8e3a4bc 100644
--- a/docs/one_shot_keys.md
+++ b/docs/one_shot_keys.md
@@ -15,11 +15,49 @@ You can control the behavior of one shot keys by defining these in `config.h`:
15#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ 15#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
16``` 16```
17 17
18* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap), not the `KC_*` codes. 18## Keycodes {#keycodes}
19* `OSL(layer)` - momentary switch to *layer*. 19
20* `OS_ON` - Turns on One Shot keys. 20|Key |Aliases |Description |
21* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`. 21|--------------------|---------|---------------------------------------------------------------------|
22* `OS_TOGG` - Toggles the one shot key status. 22|`QK_ONE_SHOT_TOGGLE`|`OS_TOGG`|Toggles One Shot keys status |
23|`QK_ONE_SHOT_ON` |`OS_ON` |Turns One Shot keys on |
24|`QK_ONE_SHOT_OFF` |`OS_OFF` |Turns One Shot keys off |
25|`OSL(layer)` | |Switch to `layer` for one keypress |
26|`OSM(mod)` | |Hold `mod` for one keypress |
27|`OS_LCTL` | |Hold Left Control for one keypress |
28|`OS_LSFT` | |Hold Left Shift for one keypress |
29|`OS_LALT` | |Hold Left Alt for one keypress |
30|`OS_LGUI` | |Hold Left GUI for one keypress |
31|`OS_LCS` | |Hold Left Control and Left Shift for one keypress |
32|`OS_LCA` | |Hold Left Control and left Alt for one keypress |
33|`OS_LCG` | |Hold Left Control and Left GUI for one keypress |
34|`OS_LSA` | |Hold Left Shift and Left Alt for one keypress |
35|`OS_LSG` | |Hold Left Shift and Left GUI for one keypress |
36|`OS_LAG` | |Hold Left Alt and Left GUI for one keypress |
37|`OS_LCSG` | |Hold Left Control, Left Shift and Left GUI for one keypress |
38|`OS_LCAG` | |Hold Left Control, Left Alt and Left GUI for one keypress |
39|`OS_LSAG` | |Hold Left Shift, Left Alt and Left GUI for one keypress |
40|`OS_RCTL` | |Hold Right Control for one keypress |
41|`OS_RSFT` | |Hold Right Shift for one keypress |
42|`OS_RALT` | |Hold Right Alt for one keypress |
43|`OS_RGUI` | |Hold Right GUI for one keypress |
44|`OS_RCS` | |Hold Right Control and Right Shift for one keypress |
45|`OS_RCA` | |Hold Right Control and Right Alt for one keypress |
46|`OS_RCG` | |Hold Right Control and Right GUI for one keypress |
47|`OS_RSA` | |Hold Right Shift and Right Alt for one keypress |
48|`OS_RSG` | |Hold Right Shift and Right GUI for one keypress |
49|`OS_RAG` | |Hold Right Alt and Right GUI for one keypress |
50|`OS_RCSG` | |Hold Right Control, Right Shift and Right GUI for one keypress |
51|`OS_RCAG` | |Hold Right Control, Right Alt and Right GUI for one keypress |
52|`OS_RSAG` | |Hold Right Shift, Right Alt and Right GUI for one keypress |
53|`OS_MEH` | |Hold Left Control, Left Shift and Left Alt for one keypress |
54|`OS_HYPR` | |Hold Left Control, Left Shift, Left Alt and Left GUI for one keypress|
55
56When One Shot keys are turned off, `OSM()` and `OSL()` will behave like normal modifier keys and `MO()`, respectively.
57
58::: info
59The `mod` parameter to the `OSM()` keycode must use the `MOD_*` prefix, rather than `KC_*`, eg. `OSM(MOD_LCTL | MOD_LSFT)`.
60:::
23 61
24Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine. 62Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
25 63