qmk/qmk_firmware

[Bug] Holding KC_RSFT does not work when Auto Shift is active (it gets released before next keypress)

Open

#24,341 创建于 2024年8月29日

在 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

When AutoShift is activated, holding KC_LSFT sends the corresponding shifted symbol or letter. However, for some reason, KC_RSFT gets released before pressing another key.

I am not sure whether this is the intended behavior, but I decided to tinker quantum/process_keycode/process_auto_shift.c a little bit anyway. I am by no means an expert, this is just a suggestion or question.

In line 161, I added MOD_BIT(KC_RSFT): Before:

https://github.com/qmk/qmk_firmware/blob/fd65bd5ae014565d333195285b154d9eeca9294b/quantum/process_keycode/process_auto_shift.c#L161

After: ) & (~(MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)))

In line 217, I added MOD_BIT(KC_RSFT)

https://github.com/qmk/qmk_firmware/blob/fd65bd5ae014565d333195285b154d9eeca9294b/quantum/process_keycode/process_auto_shift.c#L217

After: autoshift_flags.lastshifted = (get_mods() | get_oneshot_mods()) & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));

I tested it and it seems to be working, but I am not sure if it may cause further problems, so I decided to check with you.

贡献者指南