Linux: Disable IME to fix backspace/arrow keys#5188
Merged
Conversation
|
Preview available at https://egui-pr-preview.github.io/pr/5188-emilk/try-fix-linux-text-input |
Contributor
|
I tested it on Linux X11, and backspace and arrow keys are working in text inputs. |
Contributor
|
Backspace and arrow keys working in Wayland as well, although they already worked before, and so did IME (e.g., compose key), which now no longer works of course. |
YgorSouza
added a commit
to YgorSouza/egui
that referenced
this pull request
Sep 30, 2024
This reverts commit 15d3d43.
1 task
hacknus
pushed a commit
to hacknus/egui
that referenced
this pull request
Oct 30, 2024
* Closes emilk#5008 * Closes emilk#5182 * Bug introduced in emilk#4912 I suspect this will make IME no longer work on Linux, though I don't know if it ever worked. I rather have backspace/arrows working though. Please help test this (I don't have Linux!) # Tested on * [x] Mac * [ ] Linux Wayland * [x] Linux X11
emilk
pushed a commit
that referenced
this pull request
Dec 31, 2024
mikedilger
pushed a commit
to mikedilger/egui
that referenced
this pull request
Feb 17, 2025
Reverts emilk#5188 and adds a different fix to restore IME on Linux without breaking the backspace and arrow keys. * Closes emilk#5544 * Closes emilk#5198 * [x] I have followed the instructions in the PR template
zxq82lm
added a commit
to elodin-sys/elodin
that referenced
this pull request
Feb 23, 2026
Workaround for emilk/egui#5008 — on Linux (X11/XWayland via nix develop), IME activation via set_ime_allowed(true) causes the display server to capture Backspace and arrow key events through XIM, preventing them from reaching egui TextEdit widgets. bevy_egui's process_ime_system calls set_ime_allowed(true) whenever a TextEdit gains focus. egui-winit fixed this in emilk/egui#5188 and emilk/egui#5198, but bevy_egui has its own input pipeline and still triggers the problematic path. Setting enable_ime = false on the EguiContextSettings prevents the call entirely. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
zxq82lm
added a commit
to elodin-sys/elodin
that referenced
this pull request
Feb 23, 2026
Workaround for emilk/egui#5008 — on Linux (X11/XWayland via nix develop), IME activation via set_ime_allowed(true) causes the display server to capture Backspace and arrow key events through XIM, preventing them from reaching egui TextEdit widgets. bevy_egui's process_ime_system calls set_ime_allowed(true) whenever a TextEdit gains focus. egui-winit fixed this in emilk/egui#5188 and emilk/egui#5198, but bevy_egui has its own input pipeline and still triggers the problematic path. Setting enable_ime = false on the EguiContextSettings prevents the call entirely. Co-authored-by: Cursor <cursoragent@cursor.com>
zxq82lm
added a commit
to elodin-sys/elodin
that referenced
this pull request
Feb 23, 2026
* Fix command palette backspace handling at top level * Disable IME on Linux to fix Backspace/arrow keys in TextEdit Workaround for emilk/egui#5008 — on Linux (X11/XWayland via nix develop), IME activation via set_ime_allowed(true) causes the display server to capture Backspace and arrow key events through XIM, preventing them from reaching egui TextEdit widgets. bevy_egui's process_ime_system calls set_ime_allowed(true) whenever a TextEdit gains focus. egui-winit fixed this in emilk/egui#5188 and emilk/egui#5198, but bevy_egui has its own input pipeline and still triggers the problematic path. Setting enable_ime = false on the EguiContextSettings prevents the call entirely. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I suspect this will make IME no longer work on Linux, though I don't know if it ever worked.
I rather have backspace/arrows working though.
Please help test this (I don't have Linux!)
Tested on