Replies: 7 comments 10 replies
|
Have you got |
|
Hi nicm :) I seem to be having the same issue and keep getting ^H as an interpreted key when using ctrl+backspace as a binding in fish shell and ghostty. Essentially I want it to do the same thing as ctrl+W as expected in posix standards. Fedora 44 Workstation Outside tmux: $ fish_key_reader Inside tmux: $ fish_key_reader Is collapsing Ctrl+Backspace to Ctrl+H the intended behavior? I would like tmux to preserve it as a distinct extended key. Please let me know if you would want me to do anything to follow-up. |
|
Show logs please. |
|
With Ghostty (TERM=xterm-ghostty), fish_key_reader distinguishes Ctrl+h and Ctrl+Backspace outside tmux: Ctrl+h -> bind ctrl-h Inside tmux 3.7b with: set -g extended-keys on both keys become: bind ctrl-h The tmux -vv log records every Ctrl+Backspace press as: complete key \b 0x200000000068 Reproduction details- Ghostty 1.3.1-2.fc44 Version
tmux 3.7b fish, version 4.6.0 echo "$TERM" tmux show -gv extended-keys tmux show -gv extended-keys-format tmux show -gv terminal-features && tmux display-message '#{client_termname}' |
|
@divijg19 I am not a ghostty user but I did a quick search and I think you may be able to fix your issue in ghostty by setting something like this: This sends the xterm escape sequence which tmux understands as ctrl-backspace. or not bind anything at all and whatever application you are using gets the ctrl-backspace. Hope this helps. I may not be fully understanding your issue. |
|
To be clear when I said "xterm" i was referring to the xterm way of sending these keys across the wire, not proposing you try xterm, but go ahead. Many applications support this method of sending special keys across the wire. Tmux understands these xterm escape sequences already. If you set up a key (like ctrl+ backspace) in ghostty or any other program to send what xterm sends for ctrl + backspace, tmux will understand it.
You can fix this yourself in ghostty.
…On 5 August 2026 08:37:47 BST, Divij Ganjoo ***@***.***> wrote:
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*:RGB"
Haven't been able to get to xterm and wezterm yet since I'm away travelling, will be able to get you that info before the weekend.
In the meanwhile, just wanted to confirm this issue isnt because of my configuration in tmux.conf above.
--
Reply to this email directly or view it on GitHub:
#4349 (reply in thread)
You are receiving this because you commented.
Message ID: ***@***.***>
|
|
Try
1. Remove the line:
Ctrl+Backspace (\x1b[27;5;127~)
2. In .tmux.conf add
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
Maybe you can remove both the ghostty config lines if it already does it. I don't know ghostty well.
My main point is your terminal should be using these xterm compatible esc sequences. Not kitty ones.
…On 5 August 2026 08:44:19 BST, Divij Ganjoo ***@***.***> wrote:
```
# Sends xterm's modifyOtherKeys sequence for Ctrl+Backspace (\x1b[27;5;127~)
keybind = ctrl+backspace=csi:27;5;127~
```
Using this in config.ghostty unfortunately did not work
Ghostty seems to do this by default, only when tmux inherits it, does nothing happen- both fish and ghostty stop interpreting it correctly, instead yielding ctrl-h
--
Reply to this email directly or view it on GitHub:
#4349 (reply in thread)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
Terminal: ghostty 1.0.1-1.fc41
Shell: fish 3.7.0
nvim: v0.10.3
tmux: 3.5a
Outside tmux when on nvim and I press ctrl+v while in insert mode I got
<BS>for backspace<S-BS>for shift+backspace<C-BS>for ctrl+backspace<M-BS>for alt+backspaceInside tmux I got
<BS>for backspace<BS>for shift+backspace^H(greyed out) for ctrl+backspace<M-BS>for alt+backspaceI want to remap ctrl+backspace for ctrl+w in insert mode for delete whole word since ctrl+w is close tab on browser. Already trying to remap all of this on nvim, only alt+backspace works. Ctrl+bs only working outside tmux.
any ideas?
All reactions