Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mapping of extended key codes #39

Merged
merged 1 commit into from
Nov 20, 2020

Conversation

timokroeger
Copy link

Key up events have an additional bit set in the flags. Because the the key press was not identified as an extended scan code it was falsely remapped.

Example: Arrow Keys especially navigation shortcuts like ALT+left or ALT+right did not work.

@MaxGyver83
Copy link
Owner

@timokroeger Thanks for your pull request!

@fw623 You added the handling of keyUp events. Would you mind testing if this pull request brings you any drawbacks regarding you former issues in Chrome and VSCode?

@fw623
Copy link

fw623 commented Nov 19, 2020

keyInfo.flags & LLKHF_EXTENDED is correct. Since keyInfo.flags == LLKHF_EXTENDED wouldn't match an extended key on keyUp, as @timokroeger correctly noticed 👍.

I tried it a bit and didn't find any problems with it. Though I also didn't have any problems without this change. So for me it's good to go, at least that part of the PR.

Copy link
Owner

@MaxGyver83 MaxGyver83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should revert commit 998dd8e (or maybe you find a better replacement for str2wcs/MultiByteToWideChar).

src/main.c Outdated Show resolved Hide resolved
Key up events have an additional bit set in the flags. Because the
the key press was not identified as an extended scan code it was falsely
remapped.
Example: Arrow Keys especially navigation shortcuts like ALT+left or
ALT+right did not work.
Copy link
Owner

@MaxGyver83 MaxGyver83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you.

@MaxGyver83 MaxGyver83 merged commit 3370e05 into MaxGyver83:master Nov 20, 2020
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.

None yet

3 participants