diff options
| author | Shayne Holmes <shayneh@qualtrics.com> | 2017-06-30 12:08:09 -0700 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-07-05 10:55:47 -0400 |
| commit | 48ff93582ba9efbe5b8a2f7392eee822e6f25526 (patch) | |
| tree | edab94f2c0d1701895da110bda1352f5dd3fb3a3 /docs/macros.md | |
| parent | fdc2e8058b46f569a7a68ab21ef9cb3d20a9bdc2 (diff) | |
| download | qmk_firmware-48ff93582ba9efbe5b8a2f7392eee822e6f25526.tar.gz qmk_firmware-48ff93582ba9efbe5b8a2f7392eee822e6f25526.zip | |
Pull out sendstring variations to their own files.
Instead of having all sendstring keycode mappings in the main quantum.c
file, give each one its own file in keymap_extras that can be #included
in a user's keymap. If one is included, it will define the appropriate
lookup tables and overwrite the weak definitions in quantum.c.
(Including more than one sendstring definition will fail at compile
time.)
Update @rai-suta's test keymap to match, as well as the documentation.
Diffstat (limited to 'docs/macros.md')
| -rw-r--r-- | docs/macros.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/macros.md b/docs/macros.md index 1418d24ab..bbf51434a 100644 --- a/docs/macros.md +++ b/docs/macros.md | |||
| @@ -41,7 +41,7 @@ A macro can include the following commands: | |||
| 41 | 41 | ||
| 42 | ## Sending strings | 42 | ## Sending strings |
| 43 | 43 | ||
| 44 | Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string for you instead of having to build a `MACRO()`. Right now it assumes a US keymap with a QWERTY layout, so if you are using something else it may not behave as you expect. | 44 | Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string for you instead of having to build a `MACRO()`. |
| 45 | 45 | ||
| 46 | For example: | 46 | For example: |
| 47 | 47 | ||
| @@ -58,6 +58,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | |||
| 58 | }; | 58 | }; |
| 59 | ``` | 59 | ``` |
| 60 | 60 | ||
| 61 | By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap: | ||
| 62 | |||
| 63 | ``` | ||
| 64 | #include <sendstring_colemak.h> | ||
| 65 | ``` | ||
| 66 | |||
| 61 | ## Mapping a Macro to a key | 67 | ## Mapping a Macro to a key |
| 62 | 68 | ||
| 63 | Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard: | 69 | Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard: |
