qmk/qmk_firmware

[Bug] send_unicode_string() is inefficient for ASCII characters

Open

#25 382 ouverte le 18 juin 2025

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)C (43 867 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (20 368 stars)
Métriques de merge PR
 (Merge moyen 20j 9h) (27 PRs mergées en 30 j)

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

Guide contributeur