-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Wayland: Implement text_input_v3 and xkb compose #11712
Conversation
Thank you so much for tackling this! I've been meaning to get into this but other responsibilities have kept me occupied. Looks to be working on NixOS with fcitx5 in a Plasma Wayland session. In fact it works better than on macOS, since the arrow keys don't move the zed cursor around during preedit, causing the committed preedit string to end up in a completely different location than intended! Things that immediately stand out to me:
As a bonus, dead keys Just Work as expected with this, so: |
This one I think you need to configure, since you said you were on plasma |
FYI underline rendering is broken in general. It's not related to this PR. I'm working on a fix.
Weird, they don't seem to work for me. I thought they were unrelated to IME. |
Whats your Compositor and Input Method? |
I'm on Plasma 6 Wayland and I don't have any input methods installed (fcitx or anything alike), just default settings. I'm on a Spanish keyboard layout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- if let Some(range) = input_handler.marked_text_range() {
+ if let Some(range) = input_handler.selected_text_range() {
Does this affects any client behaviors? If so, I also have to modify this line.
@apricotbucket28 Hmm, interesting. If I set Virtual Keyboard to None in plasma settings dead keys stop working in zed with this PR. However they work in Firefox and alacritty. But if I set the Virtual Keyboard to Fcitx 5 they work in Zed, even when the input method is not enabled.... @XDeme1 I have it set to "Fcitx 5" -- if I set it to "Fcitx 5 Wayland Launcher" I get no input at all. I'll have to investigate the input method configuration some more I guess... and maybe nuke my |
Just a small one.
For dead keys to work without an IME enabled we need to implement https://xkbcommon.org/doc/current/group__compose.html Edit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this pull request shares the window.rs code with #11657, it shares the same limitation: the preedit display in the built-in terminal doesn't work. I can start working on that part this week, and hopefully the fix will be applicable to this PR as well. |
Gave a quick test to the PR and indeed dead keys work as expected on a Qwerty international w/ dead keys layout under Hyprland 0.39 Update: Spent a whole working day running the build. Works perfect! |
Okay, I cleared out my |
Really excited to see everyone building out IME support :D |
Release Notes: - N/A Fixes zed-industries#9207 Known Issues: - [ ] ~~After launching Zed and immediately trying to change input method, the input panel will appear at Point{0, 0}~~ - [ ] ~~`ime_handle_preedit` should not trigger `write_to_primary`~~ Move to other PR - [ ] ~~Cursor is visually stuck at the end.~~ Move to other PR Currently tested with KDE & fcitx5.
Release Notes:
Fixes #9207
Known Issues:
After launching Zed and immediately trying to change input method, the input panel will appear at Point{0, 0}Move to other PRime_handle_preedit
should not triggerwrite_to_primary
Cursor is visually stuck at the end.Move to other PRCurrently tested with KDE & fcitx5.