qmk/qmk_firmware

[Bug] Unnecessary delay when pressing the first key after a One-shot key

开放

#14,932 创建于 2021年10月24日

 (4 条评论) (1 个反应) (0 位负责人)C (43,867 个派生)batch import
bughelp wanted

仓库指标

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

描述

One-shot has 2 behaviors:

  • When the mod-key is tapped, the following keypress is modified
  • When the mod-key is held, all keypresses during the hold are modified

This leads to a necessary delay because if the modifier and then "a" and "b" are pressed in rapid succession, we don't yet know if the mod-key press is a tap or a hold, so we don't know whether to apply the modifier to "b" or not.

However, there the delay is unnecessary for "a". In either case (tap or hold), "a" will be modified, so we can send the modified keypress right away.

贡献者指南