这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@leo-liu
Copy link
Contributor

@leo-liu leo-liu commented Jul 18, 2023

This should fix #110

The root cause of the bug is a misunderstanding of the lpKeyState argument of ToUnicodeEx. The MSDN says:

If the high-order bit of a byte is set, the key is down. The low bit, if set, indicates that the key is toggled on. In this function, only the toggle bit of the CAPS LOCK key is relevant.

Thus we should toggle the CapsLock state using the low bit.

@Narsil
Copy link
Owner

Narsil commented Jul 18, 2023

Thanks a lot. I will trust you for now since you added a very nice test ! Thanks for the PR

@Narsil Narsil merged commit ba33932 into Narsil:main Jul 18, 2023
TTWNO pushed a commit to TTWNO/rdev2 that referenced this pull request Jan 23, 2025
justDeeevin pushed a commit to justDeeevin/rdevin that referenced this pull request Apr 16, 2025
justDeeevin pushed a commit to justDeeevin/rdevin that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CapsLock is not properly handled by Keyboard on windows.

2 participants