aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_advanced_keycodes.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/feature_advanced_keycodes.md')
-rw-r--r--docs/feature_advanced_keycodes.md17
1 files changed, 12 insertions, 5 deletions
diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md
index 85f4fa1bf..f2e4909d8 100644
--- a/docs/feature_advanced_keycodes.md
+++ b/docs/feature_advanced_keycodes.md
@@ -142,6 +142,8 @@ For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A ch
142 142
143One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key. 143One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key.
144 144
145Additionally, hitting keys five times in a short period will lock that key. This applies for both One Shot Modifiers and One Shot Layers, and is controlled by the `ONESHOT_TAP_TOGGLE` define.
146
145You can control the behavior of one shot keys by defining these in `config.h`: 147You can control the behavior of one shot keys by defining these in `config.h`:
146 148
147```c 149```c
@@ -152,15 +154,20 @@ You can control the behavior of one shot keys by defining these in `config.h`:
152* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes. 154* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
153* `OSL(layer)` - momentary switch to *layer*. 155* `OSL(layer)` - momentary switch to *layer*.
154 156
155Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L429). 157Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
158
159For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`.
160
161For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it.
162
163!> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop.
156 164
157If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by clicking on "Show Options", going to the "Local Resources" tab, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop.
158 165
159# Permissive Hold 166# Permissive Hold
160 167
161As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option: 168As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
162 169
163``` 170```c
164#define PERMISSIVE_HOLD 171#define PERMISSIVE_HOLD
165``` 172```
166 173
@@ -205,6 +212,6 @@ With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allo
205 212
206# Retro Tapping 213# Retro Tapping
207 214
208When you hold a dual function key, and haven't pressed anything when you release the key, normally nothing happens. However, if you enable this, if you release the key without pressing another key, it will send the original key, even if it is outside of the tapping term. 215Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term.
209 216
210For instance, if you're using `LT(2, KC_SPACE)`, if you hold the key, don't hit anything else and then release it, normally, nothing happens. But with `RETRO_TAPPING` defined in your `config.h`, it will send `KC_SPACE`. 217For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With `RETRO_TAPPING` defined in your `config.h`, it will send `KC_SPACE`.