You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any keybinding that relies on shift+ is ignored when opencode is running inside a tmux pane. The same bindings work perfectly when opencode is launched outside of tmux.
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.
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 :(
@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
@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"
Activity
mohak34 commentedon Jun 23, 2025
Shift+enter for a new line didnt work for me. Had the same doubt if something was clashing with either ghostty or tmux
Axenide commentedon Jul 1, 2025
Same for me. In other coding agents Alt + Enter is supported. That could be an alternative.
Axenide commentedon Jul 1, 2025
Indeed, after configuring it to
alt+enterit works insidetmux. :)adamdotdevin commentedon Jul 1, 2025
there's more to the story, i haven't tracked this down yet, but, fwiw, shift+enter works in tmux for me
dkarter commentedon Jul 25, 2025
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
dkarter commentedon Jul 25, 2025
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 :(
dkarter commentedon Jul 25, 2025
Disabling this setting resolved it 🤔 maybe it's no longer needed (truecolor is working still!)
mahume commentedon Nov 21, 2025
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:
But no luck. Opencode with shift+enter for a newline works well outside of Tmux, just not inside of it.
mohak34 commentedon Nov 21, 2025
@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
mahume commentedon Nov 24, 2025
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
mohak34 commentedon Nov 24, 2025
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"feat: add Codex CLI customization scripts (anomalyco#336)
Merge pull request anomalyco#336 from different-ai/feat/openwork-head…