]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - Key-Functions.md
Updated Mouse keys (markdown)
[qmk_firmware.git] / Key-Functions.md
index 9c63f673b1c5e6ca6bd4024c258ecbc26428100c..a5db223cce9ff46caed89a78e7bbf810720617f8 100644 (file)
@@ -18,6 +18,8 @@ Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` -
 
 `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
 
+`TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on).
+
 
 ### Fun with modifier keys
 
@@ -65,16 +67,20 @@ The following shortcuts automatically add `LSFT()` to keycodes to get commonly u
 
 `MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
 
-These are the values you can use for the `mod` in `MT()` and `OSM()` (right-hand modifiers are not available for `MT()`):
+These are the values you can use for the `mod` in `MT()` and `OSM()`:
 
   * MOD_LCTL
   * MOD_LSFT
   * MOD_LALT
   * MOD_LGUI
+  * MOD_RCTL
+  * MOD_RSFT
+  * MOD_RALT
+  * MOD_RGUI
   * MOD_HYPR
   * MOD_MEH
 
-These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped.
+These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers.
 
 We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: