shift-modified keybindings ignored inside tmux
Any keybinding that relies on shift+
OS | Arch Linux 6.15.3 tmux | 3.5a Ghostty | 1.1.3 OpenCode | 0.1.121
This is true for both default and custom keybindings.
Shift+enter for a new line didnt work for me. Had the same doubt if something was clashing with either ghostty or tmux
Same for me. In other coding agents Alt + Enter is supported. That could be an alternative.
Indeed, after configuring it to alt+enter it works inside tmux. :)
there's more to the story, i haven't tracked this down yet, but, fwiw, shift+enter works in tmux for me
EDIT: see my other comment
~I was able to get it to work by adding this to my config and reloading tmux~:
set -s extended-keys on
(I use Ghostty as my emulator)
More docs are available here: https://github.com/tmux/tmux/wiki/Modifier-Keys
I take that back - while it did fix the issue for OpenCode - this introduced another issue that prevents pasting text into neovim without all kinds of junk special characters being added :(
Disabling this setting resolved it 🤔 maybe it's no longer needed (truecolor is working still!)
Having the same issues
macOS: Version 15.7.2 tmux: stable 3.5a Ghostty: Ghostty 1.2.3 opencode: 1.0.85
Attempted a similar fix to @dkarter by commenting out this part of my tmux config:
# set -g default-terminal "xterm-ghostty"
But no luck. Opencode with shift+enter for a newline works well outside of Tmux, just not inside of it.
EDIT: see my other comment
~I was able to get it to work by adding this to my config and reloading tmux~:
set -s extended-keys on(I use Ghostty as my emulator)
More docs are available here: https://github.com/tmux/tmux/wiki/Modifier-Keys
@mahume I think you need to add this to the tmux config file and comment out the true color option. I have both of these in my config but have not faced any problem with pasting in neovim. Also the shift enter works for opencode inside tmux
EDIT: see my other comment
~I was able to get it to work by adding this to my config and reloading tmux~: set -s extended-keys on
(I use Ghostty as my emulator) More docs are available here: https://github.com/tmux/tmux/wiki/Modifier-Keys
@mahume I think you need to add this to the tmux config file and comment out the true color option. I have both of these in my config but have not faced any problem with pasting in neovim. Also the shift enter works for opencode inside tmux
This approach seems to result in the same issues with pasting into Neovim as described above with extra characters. I'll prob just stick with not using carriage returns in opencode. Let the LLM handle parsing that. Better than me having to parse my pasted code for hidden characters
EDIT: see my other comment ~I was able to get it to work by adding this to my config and reloading tmux~: set -s extended-keys on (I use Ghostty as my emulator) More docs are available here: https://github.com/tmux/tmux/wiki/Modifier-Keys
@mahume I think you need to add this to the tmux config file and comment out the true color option. I have both of these in my config but have not faced any problem with pasting in neovim. Also the shift enter works for opencode inside tmux
This approach seems to result in the same issues with pasting into Neovim as described above with extra characters. I'll prob just stick with not using carriage returns in opencode. Let the LLM handle parsing that. Better than me having to parse my pasted code for hidden characters
Is this not fixed when you comment out this line for true color support and have extended keys on in your tmux config? I do not have this issue but seems it is still caused due to some reason.
set -s extended-keys on
# set -g default-terminal "xterm-ghostty"