aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_macros.md
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2024-05-30 09:00:58 +0000
committerQMK Bot <hello@qmk.fm>2024-05-30 09:00:58 +0000
commit6ca94ae1587d4dcbecb47c8ea93f134c0628eef9 (patch)
tree4cb5d945b8b75c7a8e639ade0fe6b3ae4bba1ff7 /docs/feature_macros.md
parent47356b220101b4f5b8ca71b2e1aa4f04256dd60f (diff)
parentb39285807e1d21300e8a5dbbf6f2c43a8aab3494 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'docs/feature_macros.md')
-rw-r--r--docs/feature_macros.md16
1 files changed, 12 insertions, 4 deletions
diff --git a/docs/feature_macros.md b/docs/feature_macros.md
index c3162dba80..d5a830c0ef 100644
--- a/docs/feature_macros.md
+++ b/docs/feature_macros.md
@@ -252,11 +252,15 @@ You can send arbitrary keycodes by wrapping them in:
For example:
- SEND_STRING(SS_TAP(X_HOME));
+```c
+SEND_STRING(SS_TAP(X_HOME));
+```
Would tap `KC_HOME` - note how the prefix is now `X_`, and not `KC_`. You can also combine this with other strings, like this:
- SEND_STRING("VE"SS_TAP(X_HOME)"LO");
+```c
+SEND_STRING("VE"SS_TAP(X_HOME)"LO");
+```
Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline).
@@ -266,7 +270,9 @@ Delays can be also added to the string:
For example:
- SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO");
+```c
+SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO");
+```
Which would send "VE" followed by a 1-second delay, then a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline, but delayed in the middle).
@@ -284,7 +290,9 @@ There's also a couple of mod shortcuts you can use:
These press the respective modifier, send the supplied string and then release the modifier.
They can be used like this:
- SEND_STRING(SS_LCTL("a"));
+```c
+SEND_STRING(SS_LCTL("a"));
+```
Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes.