Skip to content

Loose the check for dead keys #939

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

Closed
wants to merge 2 commits into from
Closed

Conversation

daxian-dbw
Copy link
Member

In #933, I tried to use the win32 API ToUnicode to check for dead keys -- according to the documentation, if the return value is -1 or >=2, the key is most likely a dead key.
However, it turns out ToUnicode is not reliable when the keyboard is not natively supported by Windows. For example, with the Neo keyboard, ToUnicode seems to return 0 for dead keys. So the fix could be to loose the check for dead keys -- treat a key as a dead key as long as ToUnicode failed to translate.

I haven't set up the Neo keyboard yet ... so I haven't tried this fix myself. Will update once I got the Neo keyboard correctly added.

/cc @Snaptags and @MovGP0, can you please try out this fix on your Neo keyboard?

@Snaptags
Copy link

Snaptags commented Jun 13, 2019

That does look better, but only as far as the modifier keys are concerned (Caps-Lock, right Alt), they don't enter the "@" any longer.

But the problem of duplicated "dead keys" remains, i.e.
à` â^ instead of just a` a^

This is where the dead keys are located using the Neo2 layout:
dead_keys

They are used to modify the NEXT character inserted, that is I enter <^> and then <a> to get â. Or <a>, <^> and then <space> to get a^ PSReadline applies the dead key to already entered characters, too.

@daxian-dbw
Copy link
Member Author

Thanks @Snaptags for the feedback. I will close this PR in favor of #945

@daxian-dbw daxian-dbw closed this Jun 15, 2019
@daxian-dbw daxian-dbw deleted the neo branch June 15, 2019 20:26
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.

2 participants