summaryrefslogtreecommitdiffstats
path: root/docs/feature_unicode.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/feature_unicode.md')
-rw-r--r--docs/feature_unicode.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md
index 455596dab5..312a033257 100644
--- a/docs/feature_unicode.md
+++ b/docs/feature_unicode.md
@@ -42,7 +42,7 @@ Add the following to your `rules.mk`:
UNICODEMAP_ENABLE = yes
```
-Then add `X(i)` keycodes to your keymap, where _i_ is the desired character's index in the mapping table. This can be a numeric value, but it's recommended to keep the indices in an enum and access them by name.
+Then add `UM(i)` keycodes to your keymap, where _i_ is the desired character's index in the mapping table. This can be a numeric value, but it's recommended to keep the indices in an enum and access them by name.
```c
enum unicode_names {
@@ -58,13 +58,13 @@ const uint32_t unicode_map[] PROGMEM = {
};
```
-Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap.
+Then you can use `UM(BANG)`, `UM(SNEK)` etc. in your keymap.
#### Lower and Upper Case
-Characters often come in lower and upper case pairs, such as å and Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear.
+Characters often come in lower and upper case pairs, such as å and Å. To make inputting these characters easier, you can use `UP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear.
-This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP()`. This helps blend Unicode keys in with regular alphas.
+This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `UP()`. This helps blend Unicode keys in with regular alphas.
Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L36) function. This also allows you to, say, check Ctrl instead of Shift/Caps.