aboutsummaryrefslogtreecommitdiffstats
path: root/docs/feature_unicode.md
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-02-24 10:27:25 +1100
committerGitHub <noreply@github.com>2020-02-24 10:27:25 +1100
commit371ff9dd6f9c4feada34622d9a43480495b07e50 (patch)
tree785ba3038f5e431f1192c09f11d022c2c6850555 /docs/feature_unicode.md
parent716c29881c0f91e3998e1fc5c49740bd6e65876f (diff)
downloadfirmware-371ff9dd6f9c4feada34622d9a43480495b07e50.tar.gz
firmware-371ff9dd6f9c4feada34622d9a43480495b07e50.tar.bz2
firmware-371ff9dd6f9c4feada34622d9a43480495b07e50.zip
A proper `send_string()` for the Unicode feature (#8155)
Diffstat (limited to 'docs/feature_unicode.md')
-rw-r--r--docs/feature_unicode.md22
1 files changed, 17 insertions, 5 deletions
diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md
index bd1f4fa5a..546af2521 100644
--- a/docs/feature_unicode.md
+++ b/docs/feature_unicode.md
@@ -193,12 +193,24 @@ By default, when the keyboard boots, it will initialize the input mode to the la
!> Using `UNICODE_SELECTED_MODES` means you don't have to initially set the input mode in `matrix_init_user()` (or a similar function); the Unicode system will do that for you on startup. This has the added benefit of avoiding unnecessary writes to EEPROM.
-## `send_unicode_hex_string`
+## `send_unicode_string()`
-To type multiple characters for things like (ノಠ痊ಠ)ノ彡┻━┻, you can use `send_unicode_hex_string()` much like `SEND_STRING()` except you would use hex values separate by spaces.
-For example, the table flip seen above would be `send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B")`
+This function is much like `send_string()` but allows you to input UTF-8 characters directly, currently up to code point U+FFFF. Make sure your `keymap.c` is formatted in UTF-8 encoding.
-There are many ways to get a hex code, but an easy one is [this site](https://r12a.github.io/app-conversion/). Just make sure to convert to hexadecimal, and that is your string.
+```c
+send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
+```
+
+## `send_unicode_hex_string()`
+
+Similar to `send_unicode_string()`, but the characters are represented by their code point values in ASCII, separated by spaces. For example, the table flip above would be achieved with:
+
+```c
+send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
+```
+
+An easy way to convert your Unicode string to this format is by using [this site](https://r12a.github.io/app-conversion/), and taking the result in the "Hex/UTF-32" section.
+Unlike `send_unicode_string()` this function supports code points up to U+10FFFF.
## Additional Language Support
@@ -228,6 +240,6 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
If you enable the US International layout on the system, it will use punctuation to accent the characters.
-For instance, typing "`a" will result in à.
+For instance, typing "\`a" will result in à.
You can find details on how to enable this [here](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout).