-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
Non-standard modifier keys emit original ANSI characters for that key on keydown #4975
Comments
Please collect some debug info for me by launching wezterm like this, and then pressing the problematic key sequence(s): WEZTERM_LOG=window::os::x11::keyboard=trace,info wezterm -n --config debug_key_events=true |
Pressing
Pressing
|
I can confirm that I'm running into the same issue with wezterm 20240203-110809-5046fc22. |
I downgraded wezterm to 20240128.202157.1e552d76-1 and with this version the issue is not present. So any of the change in the two releases introduced the regression. Edit: scanning through the diff brought this block into my attention: // Not sure if this is a good idea, see
// <https://github.com/wez/wezterm/issues/4910> for context.
match fallback_feed {
FeedResult::Nothing(_fb_utf8, fb_sym) => {
log::trace!(
"process_key_event: RawKeyEvent using fallback \
sym {fb_sym:?} because layout did not expand to \
anything"
);
fb_sym
}
_ => sym,
} At first glance that seems to be related. |
Confirmed. If I comment out the aforementioned block (see this comment), it works as before. |
This commit ensures that ANSI chars won't be emitted when pressing non-standard modifier keys. Fixes wez#4975
This commit ensures that ANSI chars won't be emitted when pressing non-standard modifier keys. Fixes wez#4975
This commit ensures that ANSI chars won't be emitted when pressing non-standard modifier keys. Fixes wez#4975
It looks like this also was a problem last summer (#3913). It got fixed there but I don't know if the cause of the problem is the same here. |
@JakobSteinberg, do you know which commit fixed #3913? I couldn't find it right away and I was wondering if this commit could provide some insights that I can take into account for #4991. |
@schrieveslaach sadly no. I am pretty new to wezterm and got the character printing issue after my last update, because I also use the bone layout, like #4978. |
neo was broken by #4910. Reverting the commit there fixes the problem. |
I can confirm that reverting #4910 fixes the problem for me. |
What Operating System(s) are you seeing this problem on?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
Mutter
WezTerm version
20240205-070437-39d2b6ca
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
My keyboard layout uses non-standard keys as modifiers to add additional layers. For example, if I press
Mod3 + m
, a%
will be inserted. Mod3 is a modifier, comparable to the shift keys. Mod3 is mapped to the keys that are normally Caps Lock (Mod3 Left) or the| \
key (Mod3 Right) on an ANSI QWERTY layout (' #
on my German keyboard), Mod4 is mapped to< > |
(Mod4 left; no ANSI QWERTY equivalent for key) and right alt (Mod4 right).If I press a modifier that is on a key that would normally result in a character being inserted (such as
| \
for Mod3, but not Caps Lock), wezterm will insert a single character corresponding to the “original” character that would be on that key for ANSI QWERTY. For example, if I pressMod3 Right + m
to insert a%
, wezterm will insert a\%
. So the modifiers work, but an additional character is inserted once upon keydown of the modifier key. If I simultaneously press the shift key,|
will be inserted instead of\
.This problem first occurred for me for
20240203-110809-5046fc22
, it is not present for20240128-202157-1e552d76
. It happens for the native package (Arch Linux/pacman), AppImage and flatpak.To Reproduce
Activate keyboard layout with modifier keys on keys that normally print characters (such as Neo or NeoQwertz), start wezterm, press key combination such as
Mod3 + m
, withMod3
corresponding to the\ |
key. On keydown of the modifier key, the original character on that key will be inserted.Configuration
no config
Expected Behavior
No characters should be inserted when pressing the modifier keys on their own.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: