summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-10-26 21:22:47 -0700
committerJack Humbert <jack.humb@gmail.com>2018-10-27 00:22:47 -0400
commit73e92ef0c06de389d39d3ca0a8c98da2196ebec7 (patch)
tree8faeda6cf3a00f06074ea84ba2b0748f251dcdfa
parentd210ac7a3ea9a6049f2c344d3a44fdc1bccd1f1b (diff)
Docs: Add references to One Shot functions, and clean up formatting (#4189)
* Docs: Add references to One Shot functions, and clean up formatting * Update PR based on @mechmerlin's recommendations
-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 85f4fa1bfc..f2e4909d86 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
One 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.
+Additionally, 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.
+
You can control the behavior of one shot keys by defining these in `config.h`:
```c
@@ -152,15 +154,20 @@ You can control the behavior of one shot keys by defining these in `config.h`:
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
* `OSL(layer)` - momentary switch to *layer*.
-Sometimes, 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).
+Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
+
+For 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()`.
+
+For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it.
+
+!> 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.
-If 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.
# Permissive Hold
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
-```
+```c
#define PERMISSIVE_HOLD
```
@@ -205,6 +212,6 @@ With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allo
# Retro Tapping
-When 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.
+Holding 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.
-For 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`.
+For 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`.