Skip to content

Commit 3a4fce8

Browse files
fauxparkzykrah
authored andcommitted
Remove send_unicode_hex_string() (qmk#16518)
1 parent 6902b38 commit 3a4fce8

File tree

4 files changed

+0
-56
lines changed

4 files changed

+0
-56
lines changed

docs/feature_unicode.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,6 @@ send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
230230

231231
Example uses include sending Unicode strings when a key is pressed, as described in [Macros](feature_macros.md).
232232

233-
### `send_unicode_hex_string()` (Deprecated)
234-
235-
Similar to `send_unicode_string()`, but the characters are represented by their Unicode code points, written in hexadecimal and separated by spaces. For example, the table flip above would be achieved with:
236-
237-
```c
238-
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
239-
```
240-
241-
An easy way to convert your Unicode string to this format is to use [this site](https://r12a.github.io/app-conversion/) and take the result in the "Hex/UTF-32" section.
242-
243-
244233
## Additional Language Support
245234

246235
In `quantum/keymap_extras`, you'll see various language files — these work the same way as the ones for alternative layouts such as Colemak or BÉPO. When you include one of these language headers, you gain access to keycodes specific to that language / national layout. Such keycodes are defined by a 2-letter country/language code, followed by an underscore and a 4-letter abbreviation of the character to which the key corresponds. For example, including `keymap_french.h` and using `FR_UGRV` in your keymap will output `ù` when typed on a system with a native French AZERTY layout.

docs/ja/feature_unicode.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,6 @@ send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
233233

234234
使用例には、[Macros](ja/feature_macros.md) で説明されているように、キーが押された時に Unicode 文字列を送信することが含まれます。
235235

236-
### `send_unicode_hex_string()`
237-
238-
`send_unicode_string()` に似ていますが、文字は Unicode コードポイントで表され、16進数で記述され、空白で区切られています。例えば、上記のちゃぶ台返しは以下で表されます:
239-
240-
```c
241-
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
242-
```
243-
244-
[このサイト](https://r12a.github.io/app-conversion/)で結果を "Hex/UTF-32" で受け取ることで、Unicode 文字列をこの形式に簡単に変換できます。
245-
246-
247236
## 追加の言語サポート
248237

249238
`quantum/keymap_extras` には、様々な言語ファイルがあります — これらは Colemak または BÉPO のような代替レイアウトのファイルと同じように動作します。これらの言語ヘッダのいずれかを `#include` すると、その言語/国のレイアウトに固有のキーコードにアクセスできます。このようなキーコードは、2文字の国/言語コードの後に、アンダースコアとキーが対応する4文字の略語が続くことで定義されます。例えば、キーマップに `keymap_french.h` を含め、`FR_UGRV` を使うと、ネイティブのフランス語 AZERTY レイアウトを使うシステムで入力すると、`ù` が出力されます。

quantum/process_keycode/process_unicode_common.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
#include "process_unicode_common.h"
1818
#include "eeprom.h"
19-
#include <ctype.h>
20-
#include <string.h>
2119

2220
unicode_config_t unicode_config;
2321
uint8_t unicode_saved_mods;
@@ -231,37 +229,6 @@ void register_unicode(uint32_t code_point) {
231229
unicode_input_finish();
232230
}
233231

234-
// clang-format off
235-
236-
void send_unicode_hex_string(const char *str) {
237-
if (!str) {
238-
return;
239-
}
240-
241-
while (*str) {
242-
// Find the next code point (token) in the string
243-
for (; *str == ' '; str++); // Skip leading spaces
244-
size_t n = strcspn(str, " "); // Length of the current token
245-
char code_point[n+1];
246-
strncpy(code_point, str, n); // Copy token into buffer
247-
code_point[n] = '\0'; // Make sure it's null-terminated
248-
249-
// Normalize the code point: make all hex digits lowercase
250-
for (char *p = code_point; *p; p++) {
251-
*p = tolower((unsigned char)*p);
252-
}
253-
254-
// Send the code point as a Unicode input string
255-
unicode_input_start();
256-
send_string(code_point);
257-
unicode_input_finish();
258-
259-
str += n; // Move to the first ' ' (or '\0') after the current token
260-
}
261-
}
262-
263-
// clang-format on
264-
265232
// Borrowed from https://nullprogram.com/blog/2017/10/06/
266233
static const char *decode_utf8(const char *str, int32_t *code_point) {
267234
const char *next;

quantum/process_keycode/process_unicode_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ void register_hex(uint16_t hex);
9090
void register_hex32(uint32_t hex);
9191
void register_unicode(uint32_t code_point);
9292

93-
void send_unicode_hex_string(const char *str);
9493
void send_unicode_string(const char *str);
9594

9695
bool process_unicode_common(uint16_t keycode, keyrecord_t *record);

0 commit comments

Comments
 (0)