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

IM issues with Wayland and GTK_IM_MODULE=fcitx #4332

Closed
mitchellh opened this issue Jan 1, 2025 · 2 comments · Fixed by #5280
Closed

IM issues with Wayland and GTK_IM_MODULE=fcitx #4332

mitchellh opened this issue Jan 1, 2025 · 2 comments · Fixed by #5280
Labels
input Keyboard or mouse input os/linux
Milestone

Comments

@mitchellh
Copy link
Contributor

Discussion: #3628

Critical responses:

I think there are multiple issues here. More research is required to really break them down but the amount of detail in this discussion warranted an issue.

@mitchellh mitchellh added input Keyboard or mouse input os/linux labels Jan 1, 2025
@mitchellh mitchellh added this to the 1.0.2 milestone Jan 1, 2025
@hooklab
Copy link

hooklab commented Jan 2, 2025

XDG_SESSION_TYPE=x11
GTK_IM_MODULE=fcitx

With the same problem, pressing the key Ctrl+Shift, ghostty can't activate the input method.

@webfrogs
Copy link

webfrogs commented Jan 7, 2025

XDG_SESSION_TYPE=x11 GTK_IM_MODULE=fcitx

With the same problem, pressing the key Ctrl+Shift, ghostty can't activate the input method.

Found the same problem with x11(i3wm).

mitchellh added a commit that referenced this issue Jan 21, 2025
Fixes #4332

This commit fundamentally reworks the input method handling in the GTK
apprt, making it work properly (as reported in the linked issue) on both
Wayland and X11. This was tested with both a Gnome desktop on Wayland
and i3 on X11 with fcitx and mozc.

The main changes are:

- Both key press and release events must be forwarded to the input
  method.

- Input method callbacks such as preedit and commit must be expected
  outside of keypress events to handle on-screen keyboards and
  non-keyboard input devices.

- Input methods should always commit when told to. Previously, we would
  only commit when a keypress event was given. This is incorrect. For
  example, it didn't work with input method changes outside the app
  which should result in committed text (as can be seen with "official"
  Gnome apps like Notes or Console).
mitchellh added a commit that referenced this issue Jan 21, 2025
Fixes #4332

This commit fundamentally reworks the input method handling in the GTK
apprt, making it work properly (as reported in the linked issue) on both
Wayland and X11. This was tested with both a Gnome desktop on Wayland
and i3 on X11 with fcitx and mozc.

The main changes are:

- Both key press and release events must be forwarded to the input
method.

- Input method callbacks such as preedit and commit must be expected
outside of keypress events to handle on-screen keyboards and
non-keyboard input devices.

- Input methods should always commit when told to. Previously, we would
only commit when a keypress event was given. This is incorrect. For
example, it didn't work with input method changes outside the app which
should result in committed text (as can be seen with "official" Gnome
apps like Notes or Console).

The key input handling also now generally does less so I think input
latency should be positively affected by this change. I didn't measure.
liby pushed a commit to liby/ghostty that referenced this issue Feb 11, 2025
Fixes ghostty-org#4332

This commit fundamentally reworks the input method handling in the GTK
apprt, making it work properly (as reported in the linked issue) on both
Wayland and X11. This was tested with both a Gnome desktop on Wayland
and i3 on X11 with fcitx and mozc.

The main changes are:

- Both key press and release events must be forwarded to the input
  method.

- Input method callbacks such as preedit and commit must be expected
  outside of keypress events to handle on-screen keyboards and
  non-keyboard input devices.

- Input methods should always commit when told to. Previously, we would
  only commit when a keypress event was given. This is incorrect. For
  example, it didn't work with input method changes outside the app
  which should result in committed text (as can be seen with "official"
  Gnome apps like Notes or Console).

The key input handling also now generally does less so I think input
latency should be positively affected by this change. I didn't measure.
rockorager pushed a commit to rockorager/ghostty that referenced this issue Feb 12, 2025
Fixes ghostty-org#4332

This commit fundamentally reworks the input method handling in the GTK
apprt, making it work properly (as reported in the linked issue) on both
Wayland and X11. This was tested with both a Gnome desktop on Wayland
and i3 on X11 with fcitx and mozc.

The main changes are:

- Both key press and release events must be forwarded to the input
  method.

- Input method callbacks such as preedit and commit must be expected
  outside of keypress events to handle on-screen keyboards and
  non-keyboard input devices.

- Input methods should always commit when told to. Previously, we would
  only commit when a keypress event was given. This is incorrect. For
  example, it didn't work with input method changes outside the app
  which should result in committed text (as can be seen with "official"
  Gnome apps like Notes or Console).

The key input handling also now generally does less so I think input
latency should be positively affected by this change. I didn't measure.
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/linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants