aboutsummaryrefslogtreecommitdiffstats
path: root/docs/mod_tap.md
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2020-02-25 13:58:22 -0800
committerskullydazed <skullydazed@users.noreply.github.com>2020-03-05 16:00:10 -0800
commit9035c3497e31edba174c3d9be1e3540de702d2b9 (patch)
tree2fb6b31245b2439542f2a233f1f0ed47ee19870e /docs/mod_tap.md
parent5d35098bfc0d8e4c21a8f844fcc7a82866f0ab9e (diff)
downloadfirmware-9035c3497e31edba174c3d9be1e3540de702d2b9.tar.gz
firmware-9035c3497e31edba174c3d9be1e3540de702d2b9.tar.bz2
firmware-9035c3497e31edba174c3d9be1e3540de702d2b9.zip
break feature_advanced_keycodes.md up into multiple files
Diffstat (limited to 'docs/mod_tap.md')
-rw-r--r--docs/mod_tap.md54
1 files changed, 54 insertions, 0 deletions
diff --git a/docs/mod_tap.md b/docs/mod_tap.md
new file mode 100644
index 000000000..2b86701ca
--- /dev/null
+++ b/docs/mod_tap.md
@@ -0,0 +1,54 @@
+# Mod-Tap
+
+The Mod-Tap key `MT(mod, kc)` acts like a modifier when held, and a regular keycode when tapped. In other words, you can have a key that sends Escape when you tap it, but functions as a Control or Shift key when you hold it down.
+
+The modifiers this keycode and `OSM()` accept are prefixed with `MOD_`, not `KC_`:
+
+|Modifier |Description |
+|----------|----------------------------------------|
+|`MOD_LCTL`|Left Control |
+|`MOD_LSFT`|Left Shift |
+|`MOD_LALT`|Left Alt |
+|`MOD_LGUI`|Left GUI (Windows/Command/Meta key) |
+|`MOD_RCTL`|Right Control |
+|`MOD_RSFT`|Right Shift |
+|`MOD_RALT`|Right Alt (AltGr) |
+|`MOD_RGUI`|Right GUI (Windows/Command/Meta key) |
+|`MOD_HYPR`|Hyper (Left Control, Shift, Alt and GUI)|
+|`MOD_MEH` |Meh (Left Control, Shift, and Alt) |
+
+You can combine these by ORing them together like so:
+
+```c
+MT(MOD_LCTL | MOD_LSFT, KC_ESC)
+```
+
+This key would activate Left Control and Left Shift when held, and send Escape when tapped.
+
+For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap:
+
+|Key |Aliases |Description |
+|------------|-----------------------------------------------------------------|-------------------------------------------------------|
+|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
+|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
+|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
+|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
+|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
+|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
+|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
+|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
+|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
+|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
+|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
+|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
+|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
+|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
+|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
+
+## Caveats
+
+Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since any modifiers specified in the keycode are ignored.
+
+Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes.
+
+To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.