qmk/qmk_firmware

[Bug] UCIS input not cleared after resolving mnemonic

Open

#22,438 创建于 2023年11月10日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)C (43,867 fork)batch import
bughelp wanted

仓库指标

Star
 (20,368 star)
PR 合并指标
 (平均合并 20天 9小时) (30 天内合并 27 个 PR)

描述

Describe the Bug

After resolving a unicode mnemonic, successfully or not, the input buffer should be cleared. In the current code the old input is kept in the buffer, potentially leading to incorrect resolution of future inputs.

Ex. enter the mnemonic "alpha", input is now "alpha". If you then enter the mnemonic "beta", input contains "betaa", which is incorrect.

I suggest using memset to zero out the input buffer at the end of ucis_finish.

Am I missing something important?

Keyboard Used

No response

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output

No response

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

贡献者指南