-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
After typing an accented letter, WezTerm cursor keeps showing the accent mode until WezTerm is restarted #4841
Comments
I can confirm that behaviour with Xorg configured compose key like that
|
I can't reproduce this, so I suspect there's another factor at play. I'm on Gnome 42.9 (ubuntu), but otherwise: yes, have ibus enabled and the steps above seem to work to correctly produce the accented character and then the compose cursor returns to normal. Please run wezterm with the following trace env set:
then run through those repro steps again and share what gets logged. |
@wez here it is, hope it helps
|
Hmm, inconclusive.
the lines to pay the most attention to will look like this:
but I would like to see all of them |
Here is the log of the last command: https://dpaste.org/R5OA0 |
@wez done too, here it is (the messages you mention are lines 289-290): https://gist.github.com/sorashi/746e87aff885bdbe756d8fb1808fbe70#file-wez-log-L289-L290 |
We have two different ways to compose: * Via xkbd * Via IME messages In the latter case, we receive notifications from the IME about the composed text, but are apparently not guaranteed to receive them about the composition status overall. This commit will synthesize clearing the composition status when we receive the instruction to emit composed text. The hope is that this will clear the compose cursor state that appears to get stuck for some users of ibus + Gnome 45. refs: #4841
I've pushed a commit to main that may help with this; it'll show up in nightly builds in about 20-30 minutes, or you can build from source if you prefer. |
Unfortunately I can't report that it's solved with xkbd :( |
Ok, reopened for you @wimstefan |
In discussion about the ongoing weirdness with modifier processing, it sounds like we could/should be using `update_key` rather than `update_mask` under X11. (Wayland: has to use `update_mask`, per the docs: https://docs.rs/xkbcommon/latest/xkbcommon/xkb/struct.State.html#method.update_key) I quickly tried out a proof of concept with this and it doesn't seem to hurt, but since I'm unsure if there are other nuances to consider, I've put this behind a config option. `x11_use_passive_key_updates` defaults to true which results in the use of `update_mask` on X11. Setting it to false will switch to using `update_key` instead, and may improve handling of xkb states. refs: #4841 refs: ibus/ibus#2600 refs: #4151
@wimstefan I think you might be technically experiencing a different issue, or rather, that perhaps some of this issue is really another manifestation of:
I've pushed a commit that adds a new config option that I'd like you to try: |
I've pulled the latest commits, compiled wezterm and added the new config option but the problem remains the same ... |
@wimstefan is the behavior the same in the last released version? Understanding whether this is a regression or a longstanding issue will help focus where to look |
It's not clear exactly how this triggers, but in setups where a compose key has been configured (against the default for the configured keyboard layout), it seems as though certain events that indicate when composition is complete are not delivered, leaving the compose cursor in an inconsistent state. This commit attempts to detect that composing->!composing state transition and bubble it up; when we return Nothing and had previously had a composition string we're return a bool to cause the caller to emit an event that clears the composition state. I'm not totally sure this is 100% right, but I think it may help with the case we're discussing in #4841
@wimstefan I've pushed a couple more changes:
|
@wez With that version (20240123-150250-eb3a78b0) the first key of the composed keys is not kept in the cursor anymore but I'm still not able to write a composed character like "í" ... |
@wimstefan oh, so composition isn't actually working in your case? Was that how it was before this most recent change? |
I just noticed that behaviour a couple of days ago and chimed into this issue since I thought I'm experiencing the same problem. I've installed now the official Gentoo release (20230712-072601-f4abf8fd-gentoo) and the composed keys like "í" are working as expected ... |
and if that isn't conclusive, it would be great if you could run a git bisect between |
OK I'll do that tomorrow morning - now it's 1.30am here and bedtime 😏 |
Ah, interesting! Ok, I think 079e87d may resolve this! |
And it is fixed indeed! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
Gnome 45.3
WezTerm version
20240121-180215-76028ca1
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
Typing an accented letter leaves it inside the cursor until wezterm is restarted. The issue is shell-independent and thus I conclude it's a bug in wezterm. See the attached screen recording.
wezterm-accent.webm
To Reproduce
ˇ
accent mode" and expects a letter next. Wezterm cursor correctly displaysˇ
.t
). This results inť
and leaves the "accent mode".ˇ
.The same issue occurs with
´
,¨
, and possibly other accents.Configuration
no config
Expected Behavior
Wezterm cursor should stop displaying
ˇ
after leaving accent mode.Logs
No response
Anything else?
This problem is relevant when typing in the language with accents in a terminal text editor, like vim.
The text was updated successfully, but these errors were encountered: