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

Use keyCode before defaulting to unrecognized rime keycode #936

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

LEOYoon-Tsaw
Copy link
Member

Sometimes (e.g. in ABC Extended keyboard layout), Option + certain keys gives modifier letters, even with NSEvent.charactersIgnoringModifiers

For example, +6 gives U+02C6 "MODIFIER LETTER CIRCUMFLEX ACCENT"

Thus in these keyboard layouts, shortcuts like +6 will never work with Rime.

This proposal try to use raw key code before defaulting to unrecognized symbols, so that although Rime doesn't recognize U+02C6 as a key char, but instead, we use the key code of 6 for processing.

Testing: It works for the stated purpose, +6 works in ABC - Extended keyboard layout.

@LEOYoon-Tsaw
Copy link
Member Author

@lotem you have a big stock of keyboards, do you think it is going to lead to unwanted side effects

@lotem
Copy link
Member

lotem commented Jun 8, 2024

test other layouts like dvorak French azerty

@LEOYoon-Tsaw
Copy link
Member Author

I tried French AZERTY keyboard, it works well. But this is software switch, I don't know if a physically different keyboard will behave the same way

@lotem
Copy link
Member

lotem commented Jun 25, 2024

All modern physical keyboards speak the same protocol.

@lotem
Copy link
Member

lotem commented Jun 25, 2024

In R2ime the user's program need to clarify whether the key code or character is processed.

@LEOYoon-Tsaw
Copy link
Member Author

Then I'll proceed with this PR, while looking forward to R²ime

@LEOYoon-Tsaw LEOYoon-Tsaw merged commit 75bef13 into rime:master Jun 25, 2024
1 check passed
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