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

macOS: virtual keycode(Backslash) when keyDown event in JIS keyboard layout #2745

Closed

Conversation

Joseph0304
Copy link

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

Fix example: #2577
I tried to fix it, but unable to get keycode(backslash) on keyUp event.
Test $ cargo run --example ime

...
TRACE [winit::platform_impl::platform::view] Triggered `keyDown:`
...
TRACE [winit::platform_impl::platform::view] Completed `keyDown:`
TRACE [winit::platform_impl::platform::view] Triggered `selectedRange`
TRACE [winit::platform_impl::platform::view] Completed `selectedRange`
TRACE [winit::platform_impl::platform::view] Triggered `selectedRange`
TRACE [winit::platform_impl::platform::view] Completed `selectedRange`
key: KeyboardInput { scancode: 93, state: Pressed, virtual_keycode: Some(Backslash), modifiers: (empty) }
ch: '\\'
TRACE [winit::platform_impl::platform::view] Triggered `keyUp:`
TRACE [winit::platform_impl::platform::view] Completed `keyUp:`
key: KeyboardInput { scancode: 93, state: Released, virtual_keycode: Some(Yen), modifiers: (empty) }
...

May be helpful that https://github.com/chromium/chromium/blob/a86a8a6bcfa438fa3ac2eba6f02b3ad1f8e0756f/ui/views/cocoa/bridged_content_view.mm#L541

@kchibisov
Copy link
Member

Thanks for attempt, but see #2686 #2662.

@kchibisov kchibisov closed this Mar 18, 2023
@Joseph0304 Joseph0304 deleted the macos-keyevent-backslash branch March 19, 2023 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants