qmk/qmk_firmware

[Bug] send_unicode_string() is inefficient for ASCII characters

Open

#25.382 geöffnet am 18. Juni 2025

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C (43.867 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (20.368 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 20T 9h) (27 gemergte PRs in 30 T)

Beschreibung

Describe the Bug

send_unicode_string("a") 

sends many keystrokes for the unicode code point of the letter a. Eg <ctrl><shift>u61<space> when it could just send a single keystroke.

This is especially noticeable when the keyboard is connected to Linux and all the extra keystrokes are briefly displayed before being replaced by the unicode character.

It makes sending macros with this function slower when the keyboard is connected to any operating system.

I believe that this could be changed directly in send_unicode_string(). If it would somehow be incompatible in some circumstances, a second function called send_mixed_string() could be introduced that would be documented to send single keystrokes for ASCII characters.

This has been implemented as a community module, but it would be desirable to have this efficiency in qmk core. See send_mixed_string.c

Keyboard Used

No response

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

Contributor Guide