-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
Wezterm may send different keys than kitty with kitty protocol enabled #4785
Comments
A quicker reproduction: printf '\033[>1u' && showkey -a With
With
|
I think the problem lies in this early matcher. If I remove early returns for both diff --git i/wezterm-input-types/src/lib.rs w/wezterm-input-types/src/lib.rs
index b3298bad6..5bf150e1b 100644
--- i/wezterm-input-types/src/lib.rs
+++ w/wezterm-input-types/src/lib.rs
@@ -1648,8 +1648,8 @@ impl KeyEvent {
{
// Check for simple text generating keys
match &self.key {
- Char('\x08') => return '\x7f'.to_string(),
- Char('\x7f') => return '\x08'.to_string(),
+ Char('\x08') => {},
+ Char('\x7f') => {},
Char(c) => return c.to_string(),
_ => {}
} |
I believe this is a duplicate of #3621. I made that issue when I ran into the same issue with the Delete key, only in Neovim, and I've just been working around it by remapping |
I have the exact same problem. |
I have found other keys not working as expected.
https://github.com/amiorin/wezterm-kkp-emacs-bug to reproduce with docker and emacs. |
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
KWin
WezTerm version
20230712-072601-f4abf8fd
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
Running emacs in terminal mode (
emacs -nw
) withkpp
package (https://github.com/benjaminor/kkp, listed here https://sw.kovidgoyal.net/kitty/keyboard-protocol/), with Kitty Keyboard Protocol enabled, wezterm sends C-h instead of DEL when pressing DEL key. This doesn't reproduce withkitty
itself with the same configuration onemacs
side. It also doesn't reproduce withwezterm
on MacOS.To Reproduce
Minimal emacs configuration (
~/.config/emacs/init.el
):Run emacs with
emacs -nw
, useC-x b RET
to switch to writable buffer, write some random text, move to the beginning of the line and press DEL twice to remove 2 chars in front of the cursor. Withkitty
two characters are removed as expected, withwizterm
functionhelp-for-help
is invoked which is bound toC-h C-h
Configuration
Expected Behavior
No response
Logs
Logs from pressing DELETE while in emacs:
Anything else?
No response
The text was updated successfully, but these errors were encountered: