diff options
author | fauxpark <fauxpark@gmail.com> | 2019-11-26 18:16:58 +1100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-11-25 23:16:58 -0800 |
commit | 5a6737a778cfa828e4fdb5d382a84a41e5210d8e (patch) | |
tree | 0c746428a46df925b30675990aca209f59db2d9d /docs/feature_macros.md | |
parent | a2cedf4555ab417d849cbacf9562fd92407d5d71 (diff) | |
download | qmk_firmware-5a6737a778cfa828e4fdb5d382a84a41e5210d8e.tar.gz qmk_firmware-5a6737a778cfa828e4fdb5d382a84a41e5210d8e.zip |
Send string keycode tweaks (#7471)
Diffstat (limited to 'docs/feature_macros.md')
-rw-r--r-- | docs/feature_macros.md | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/docs/feature_macros.md b/docs/feature_macros.md index d81c3c655..c13ae8206 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md | |||
@@ -67,14 +67,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
67 | case QMKURL: | 67 | case QMKURL: |
68 | if (record->event.pressed) { | 68 | if (record->event.pressed) { |
69 | // when keycode QMKURL is pressed | 69 | // when keycode QMKURL is pressed |
70 | SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); | 70 | SEND_STRING("https://qmk.fm/\n"); |
71 | } else { | 71 | } else { |
72 | // when keycode QMKURL is released | 72 | // when keycode QMKURL is released |
73 | } | 73 | } |
74 | break; | 74 | break; |
75 | case MY_OTHER_MACRO: | 75 | case MY_OTHER_MACRO: |
76 | if (record->event.pressed) { | 76 | if (record->event.pressed) { |
77 | SEND_STRING(SS_LCTRL("ac")); // selects all and copies | 77 | SEND_STRING(SS_LCTL("ac")); // selects all and copies |
78 | } | 78 | } |
79 | break; | 79 | break; |
80 | } | 80 | } |
@@ -109,18 +109,21 @@ Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if | |||
109 | 109 | ||
110 | There's also a couple of mod shortcuts you can use: | 110 | There's also a couple of mod shortcuts you can use: |
111 | 111 | ||
112 | * `SS_LCTRL(string)` | 112 | * `SS_LCTL(string)` |
113 | * `SS_LGUI(string)` | ||
114 | * `SS_LALT(string)` | ||
115 | * `SS_LSFT(string)` | 113 | * `SS_LSFT(string)` |
116 | * `SS_RALT(string)` | 114 | * `SS_LALT(string)` |
115 | * `SS_LGUI(string)`, `SS_LCMD(string)` or `SS_LWIN(string)` | ||
116 | * `SS_RCTL(string)` | ||
117 | * `SS_RSFT(string)` | ||
118 | * `SS_RALT(string)` or `SS_ALGR(string)` | ||
119 | * `SS_RGUI(string)`, `SS_RCMD(string)` or `SS_RWIN(string)` | ||
117 | 120 | ||
118 | These press the respective modifier, send the supplied string and then release the modifier. | 121 | These press the respective modifier, send the supplied string and then release the modifier. |
119 | They can be used like this: | 122 | They can be used like this: |
120 | 123 | ||
121 | SEND_STRING(SS_LCTRL("a")); | 124 | SEND_STRING(SS_LCTL("a")); |
122 | 125 | ||
123 | Which would send LCTRL+a (LCTRL down, a, LCTRL up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes. | 126 | 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. |
124 | 127 | ||
125 | ### Alternative Keymaps | 128 | ### Alternative Keymaps |
126 | 129 | ||