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: AquaSKK Japanese input behaves poorly #4539

Closed
mitchellh opened this issue Jan 3, 2025 · 2 comments · Fixed by #4609
Closed

macOS: AquaSKK Japanese input behaves poorly #4539

mitchellh opened this issue Jan 3, 2025 · 2 comments · Fixed by #4609
Assignees
Labels
input Keyboard or mouse input os/macos
Milestone

Comments

@mitchellh
Copy link
Contributor

Discussed in #2628

Originally posted by lonsagisawa November 8, 2024

Description

I'm using AquaSKK for Japanese input.
AquaSKK uses unusual keybindings, like Ctrl-j to turn on hiragana input, q to toggle hiragana and katakana, l to return to latin input.

In standard macOS applications, keybinds are not transferred to app.

2024-11-08.23.23.26.mp4

However, in Ghostty, IME and Ghostty both receive keybinds.

2024-11-08.23.25.17.mp4

More Details:

Specific reproduction step: #2628 (comment)

@mitchellh mitchellh added input Keyboard or mouse input os/macos labels Jan 3, 2025
@lonsagisawa
Copy link

Additional Information: In Linux environment(Fedora 41, Plasma 6.2, Wayland), with input method has similar keybindings(Fcitx5-SKK), does not have this issue.

@s3igo
Copy link

s3igo commented Jan 4, 2025

This issue also occurs in macSKK, another SKK-based IME implementation.

@mitchellh mitchellh added this to the 1.0.2 milestone Jan 4, 2025
mitchellh added a commit that referenced this issue Jan 5, 2025
Fixes #4539

AquaSKK is a Japanese IME (Input Method Editor) for macOS. It uses
keyboard inputs to switch between input modes. I don't know any other
IMEs that do this, but it's possible that there are others. Prior to
this change, the keyboard inputs to switch between input modes were
being sent to the terminal, resulting in erroneous characters being
written.

This change adds a check during keyDown events to see if the input
source changed _during the event_. If it did, we assume an IME captured
it and we don't pass the event to the terminal.

This makes AquaSKK functional in Ghostty.
@mitchellh mitchellh self-assigned this Jan 5, 2025
mitchellh added a commit that referenced this issue Jan 5, 2025
Fixes #4539

AquaSKK is a Japanese IME (Input Method Editor) for macOS. It uses
keyboard inputs to switch between input modes. I don't know any other
IMEs that do this, but it's possible that there are others. Prior to
this change, the keyboard inputs to switch between input modes were
being sent to the terminal, resulting in erroneous characters being
written.

This change adds a check during keyDown events to see if the input
source changed _during the event_. If it did, we assume an IME captured
it and we don't pass the event to the terminal.

This makes AquaSKK functional in Ghostty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input Keyboard or mouse input os/macos
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants