qmk/qmk_firmware

[Bug] send_unicode_string() is inefficient for ASCII characters

Open

#25,382 opened on Jun 18, 2025

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C (43,867 forks)batch import
bughelp wanted

Repository metrics

Stars
 (20,368 stars)
PR merge metrics
 (Avg merge 20d 9h) (27 merged PRs in 30d)

Description

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