qmk/qmk_firmware

[Bug] send_unicode_string() is inefficient for ASCII characters

Open

#25.382 aberto em 18 de jun. de 2025

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)C (43.867 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (20.368 stars)
Métricas de merge de PR
 (Mesclagem média 20d 9h) (27 fundiu PRs em 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

Guia do colaborador