-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Can't map commands to “C-ret" "S-ret" "C-m" #6137
Comments
The escape sequences the terminal uses to describe these events are ambiguous with the default way that key events are reported. #4939 supports accepting events from an enhanced keyboard protocol but this only works if your terminal supports the enhanced keyboard protocol. I don't think it's implemented in Konsole (https://sw.kovidgoyal.net/kitty/keyboard-protocol/#comprehensive-keyboard-handling-in-terminals) but you can check by running in verbose mode with If it isn't supported for Konsole, you will need to use a terminal emulator that supports the protocol to be able to use these bindings. |
Thank your suggestion, I'm trying a new terminal, kitty. Now it's OK. I see that |
There isn't a special case for C-m in the codebase as far as I know. I would expect C-m to act like enter if you are using the keybinding in the issue description though: [keys.insert]
C-m = "open_below" With that binding, C-m in insert mode should act like You can also try a rebinding like [keys.normal]
C-m = "toggle_comments" which should make C-m act like C-c in normal mode - it will toggle comments for the currently selected lines |
It is not working as your description. C-m always equates to enter. |
append reply, it doesn't work in konsole. |
Oh I see, yeah that's expected behavior in Konsole or any terminal emulator that doesn't support the keyboard enhancement protocol. The escape sequence for C-m is the same as Enter. There are a bunch of other ambiguous key combinations like C-backspace being the same as C-h. |
It's mean that the action of C-m is decided by terminal? |
For all the terminal emulators that I know of, C-m sends the same escape sequence as Enter. You can tell C-m and Enter apart if the terminal and the app (Helix in this case) enable and use the enhanced keyboard protocol but otherwise they look the same. |
It is very useful for me, thank you |
Summary
I try to some key remapping below, but not working.
Reproduction Steps
Helix log
No response
Platform
Linux
Terminal Emulator
konsole
Helix Version
helix 22.12 (8dab8a0)
The text was updated successfully, but these errors were encountered: