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

Non-US keyboard layouts don't work properly in macOS in OSR mode #448

Open
cijaaimee opened this issue Jun 4, 2023 · 0 comments
Open

Non-US keyboard layouts don't work properly in macOS in OSR mode #448

cijaaimee opened this issue Jun 4, 2023 · 0 comments
Labels
bug Bug report

Comments

@cijaaimee
Copy link

cijaaimee commented Jun 4, 2023

Describe the bug
When a key event is sent to CEF using offscreen rendering, the native code will only bind keys in the standard US layout when in macOS. This is because the code in charge of obtaining the virtual keycode is hardcoded to only work with this layout.

To Reproduce
Steps to reproduce the behavior:

  1. Create a browser in OSR mode.
  2. Type any key that isn't part of the US keyboard layout (e.g. á, ñ`).
    You'll see that the key is ignored. This does not occur when OSR is disabled.

Expected behavior
When typing, the key event should be forwarded to CEF.

Screenshots

Versions (please complete the following information):

  • OS: MacOS 13.0.1
  • Java Version: OpenJDK 17
  • JCEF Version: a0af101
  • CEF Version: 110.0.25

Additional context
Does the problem reproduce with the JCEF simple or detailed sample application at the same version?
Yes.

Does the problem reproduce with the CEF cefclient or cefsimple sample application at the same version?
Yes.

Does the problem reproduce with Google Chrome at the same version?
No.

Add any other context about the problem here.
Here's an useful discussion on how to implement layout-independent char->keycode translation:
https://stackoverflow.com/questions/1918841/how-to-convert-ascii-character-to-cgkeycode/1971027#1971027

@cijaaimee cijaaimee added the bug Bug report label Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

1 participant