Starting from opencode 1.1.22, shift+enter and ctrl+enter are not working. #6506

Closed
opened 2026-02-16 18:04:25 -05:00 by yindo · 5 comments
Owner

Originally created by @fengwk on GitHub (Jan 16, 2026).

Originally assigned to: @kommander on GitHub.

Description

Starting from OpenCode version 1.1.22, Shift+Enter and Ctrl+Enter no longer create line breaks in the input. Rolling back OpenCode to version 1.1.21 restored normal functionality.

Only kitty works properly on opencode 1.1.22, but line wrapping fails when using kitty+tmux. Since the issue is resolved after rolling back to opencode 1.1.21, I believe this is neither a configuration problem with kitty nor tmux.

env: kitty + tmux + opencode
os: archlinux

kitty config (version 0.43.1)

include ./catppuccin-mocha.conf

font_family SauceCodePro Nerd Font
symbol_map U+4E00-U+9FFF Microsoft YaHei UI
font_size 11

initial_window_width 121c
initial_window_height 32c
remember_window_size no

shell_integration no-title

background_opacity 0.85

enable_audio_bell no

map ctrl+shift+u scroll_page_up
map ctrl+shift+d scroll_page_down

map shift+enter send_text all \x1b[13;2u
map ctrl+enter send_text all \x1b[13;5u

tmux config (version 3.5a)

# plugins manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

# powerline
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_window_default_text "#{window_name}"
set -g @catppuccin_window_text "#{window_name}"
set -g @catppuccin_window_current_text "#{window_name}"
# set -g @catppuccin_window_default_text "#{pane_current_command}"
# set -g @catppuccin_window_current_text "#{pane_current_command}"
# set -g @catppuccin_window_current_text "#{pane_current_path}"
set -g @catppuccin_window_right_separator "█ "
set -g @catppuccin_window_number_position "left"
set -g @catppuccin_window_middle_separator " | "
set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_current_fill "all"
# set -g @catppuccin_status_modules_left "session application"
set -g @catppuccin_status_modules_left "session"
# set -g @catppuccin_status_modules_right "date_time"
set -g @catppuccin_status_modules_right "null"
set -g @catppuccin_status_left_separator "█"
set -g @catppuccin_status_right_separator "█"
set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M:%S"

run '~/.config/tmux/plugins/tpm/tpm'

set -g default-terminal "$TERM"
set -ag terminal-overrides ",$TERM:Tc"

bind -n C-S-v run-shell "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"

set -gq allow-passthrough on
set -g visual-activity off

set -s escape-time 0
set-option -g prefix C-space
unbind C-b
bind C-space send-prefix

set -g mouse on
set -g history-limit 10000

set -g base-index 1
setw -g pane-base-index 1

bind C new-session

bind enter swap-pane -d -t 1

bind ! join-pane -t :1
bind @ join-pane -t :2
bind '#' join-pane -t :3
bind $ join-pane -t :4
bind % join-pane -t :5
bind ^ join-pane -t :6
bind & join-pane -t :7
bind * join-pane -t :8
bind ( join-pane -t :9

bind % split-window -c "#{@pane_pwd}"
bind '"' split-window -h -c "#{@pane_pwd}"
bind c new-window -c "#{@pane_pwd}"

setw -g mode-keys vi
bind space copy-mode
bind C-space copy-mode
bind -T copy-mode-vi v send-keys -X begin-selection
if-shell '[[ "$(uname)" == "Darwin" ]]' \
    'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"' \
    'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -in"'
if-shell '[[ "$(uname)" == "Darwin" ]]' \
    'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"' \
    'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -in"'

set -g set-clipboard on

is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"

bind h if-shell "$is_vim" 'send-keys C-space h' 'select-pane -L'
bind j if-shell "$is_vim" 'send-keys C-space j' 'select-pane -D'
bind k if-shell "$is_vim" 'send-keys C-space k' 'select-pane -U'
bind l if-shell "$is_vim" 'send-keys C-space l' 'select-pane -R'
bind H if-shell "$is_vim" 'send-keys C-space H' 'swap-pane -D'
bind J if-shell "$is_vim" 'send-keys C-space J' 'swap-pane -D'
bind K if-shell "$is_vim" 'send-keys C-space K' 'swap-pane -U'
bind L if-shell "$is_vim" 'send-keys C-space L' 'swap-pane -U'
bind C-h if-shell "$is_vim" 'send-keys C-space h' 'select-pane -L'
bind C-j if-shell "$is_vim" 'send-keys C-space j' 'select-pane -D'
bind C-k if-shell "$is_vim" 'send-keys C-space k' 'select-pane -U'
bind C-l if-shell "$is_vim" 'send-keys C-space l' 'select-pane -R'
bind -T copy-mode-vi "C-h" select-pane -L
bind -T copy-mode-vi "C-j" select-pane -D
bind -T copy-mode-vi "C-k" select-pane -U
bind -T copy-mode-vi "C-l" select-pane -R
bind -n 'M-left' if-shell "$is_vim" 'send-keys M-left' 'resize-pane -L 2'
bind -n 'M-down' if-shell "$is_vim" 'send-keys M-down' 'resize-pane -D'
bind -n 'M-up' if-shell "$is_vim" 'send-keys M-up' 'resize-pane -U'
bind -n 'M-right' if-shell "$is_vim" 'send-keys M-right' 'resize-pane -R 2'
bind -T copy-mode-vi 'M-left' resize-pane -L
bind -T copy-mode-vi 'M-down' resize-pane -D
bind -T copy-mode-vi 'M-up' resize-pane -U
bind -T copy-mode-vi 'M-right' resize-pane -R

unbind x
bind x 'confirm-before kill-pane'

bind '~' previous-layout
bind '`' next-layout


set -g extended-keys on

https://github.com/anomalyco/opentui/issues/544

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

archlinux 6.12.53-1-lts

Terminal

kitty + tmux

Originally created by @fengwk on GitHub (Jan 16, 2026). Originally assigned to: @kommander on GitHub. ### Description Starting from OpenCode version 1.1.22, Shift+Enter and Ctrl+Enter no longer create line breaks in the input. Rolling back OpenCode to version 1.1.21 restored normal functionality. Only kitty works properly on opencode 1.1.22, but line wrapping fails when using kitty+tmux. Since the issue is resolved after rolling back to opencode 1.1.21, I believe this is neither a configuration problem with kitty nor tmux. env: kitty + tmux + opencode os: archlinux kitty config (version 0.43.1) ``` include ./catppuccin-mocha.conf font_family SauceCodePro Nerd Font symbol_map U+4E00-U+9FFF Microsoft YaHei UI font_size 11 initial_window_width 121c initial_window_height 32c remember_window_size no shell_integration no-title background_opacity 0.85 enable_audio_bell no map ctrl+shift+u scroll_page_up map ctrl+shift+d scroll_page_down map shift+enter send_text all \x1b[13;2u map ctrl+enter send_text all \x1b[13;5u ``` tmux config (version 3.5a) ``` # plugins manager set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' # powerline set -g @plugin 'catppuccin/tmux' set -g @catppuccin_window_default_text "#{window_name}" set -g @catppuccin_window_text "#{window_name}" set -g @catppuccin_window_current_text "#{window_name}" # set -g @catppuccin_window_default_text "#{pane_current_command}" # set -g @catppuccin_window_current_text "#{pane_current_command}" # set -g @catppuccin_window_current_text "#{pane_current_path}" set -g @catppuccin_window_right_separator "█ " set -g @catppuccin_window_number_position "left" set -g @catppuccin_window_middle_separator " | " set -g @catppuccin_window_default_fill "none" set -g @catppuccin_window_current_fill "all" # set -g @catppuccin_status_modules_left "session application" set -g @catppuccin_status_modules_left "session" # set -g @catppuccin_status_modules_right "date_time" set -g @catppuccin_status_modules_right "null" set -g @catppuccin_status_left_separator "█" set -g @catppuccin_status_right_separator "█" set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M:%S" run '~/.config/tmux/plugins/tpm/tpm' set -g default-terminal "$TERM" set -ag terminal-overrides ",$TERM:Tc" bind -n C-S-v run-shell "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" set -gq allow-passthrough on set -g visual-activity off set -s escape-time 0 set-option -g prefix C-space unbind C-b bind C-space send-prefix set -g mouse on set -g history-limit 10000 set -g base-index 1 setw -g pane-base-index 1 bind C new-session bind enter swap-pane -d -t 1 bind ! join-pane -t :1 bind @ join-pane -t :2 bind '#' join-pane -t :3 bind $ join-pane -t :4 bind % join-pane -t :5 bind ^ join-pane -t :6 bind & join-pane -t :7 bind * join-pane -t :8 bind ( join-pane -t :9 bind % split-window -c "#{@pane_pwd}" bind '"' split-window -h -c "#{@pane_pwd}" bind c new-window -c "#{@pane_pwd}" setw -g mode-keys vi bind space copy-mode bind C-space copy-mode bind -T copy-mode-vi v send-keys -X begin-selection if-shell '[[ "$(uname)" == "Darwin" ]]' \ 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"' \ 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -in"' if-shell '[[ "$(uname)" == "Darwin" ]]' \ 'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"' \ 'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -in"' set -g set-clipboard on is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'" bind h if-shell "$is_vim" 'send-keys C-space h' 'select-pane -L' bind j if-shell "$is_vim" 'send-keys C-space j' 'select-pane -D' bind k if-shell "$is_vim" 'send-keys C-space k' 'select-pane -U' bind l if-shell "$is_vim" 'send-keys C-space l' 'select-pane -R' bind H if-shell "$is_vim" 'send-keys C-space H' 'swap-pane -D' bind J if-shell "$is_vim" 'send-keys C-space J' 'swap-pane -D' bind K if-shell "$is_vim" 'send-keys C-space K' 'swap-pane -U' bind L if-shell "$is_vim" 'send-keys C-space L' 'swap-pane -U' bind C-h if-shell "$is_vim" 'send-keys C-space h' 'select-pane -L' bind C-j if-shell "$is_vim" 'send-keys C-space j' 'select-pane -D' bind C-k if-shell "$is_vim" 'send-keys C-space k' 'select-pane -U' bind C-l if-shell "$is_vim" 'send-keys C-space l' 'select-pane -R' bind -T copy-mode-vi "C-h" select-pane -L bind -T copy-mode-vi "C-j" select-pane -D bind -T copy-mode-vi "C-k" select-pane -U bind -T copy-mode-vi "C-l" select-pane -R bind -n 'M-left' if-shell "$is_vim" 'send-keys M-left' 'resize-pane -L 2' bind -n 'M-down' if-shell "$is_vim" 'send-keys M-down' 'resize-pane -D' bind -n 'M-up' if-shell "$is_vim" 'send-keys M-up' 'resize-pane -U' bind -n 'M-right' if-shell "$is_vim" 'send-keys M-right' 'resize-pane -R 2' bind -T copy-mode-vi 'M-left' resize-pane -L bind -T copy-mode-vi 'M-down' resize-pane -D bind -T copy-mode-vi 'M-up' resize-pane -U bind -T copy-mode-vi 'M-right' resize-pane -R unbind x bind x 'confirm-before kill-pane' bind '~' previous-layout bind '`' next-layout set -g extended-keys on ``` https://github.com/anomalyco/opentui/issues/544 ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System archlinux 6.12.53-1-lts ### Terminal kitty + tmux
yindo added the opentuibug labels 2026-02-16 18:04:25 -05:00
yindo closed this issue 2026-02-16 18:04:25 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4997: [Pinned] Keybinds - comprehensive keybinding documentation and related issues
  • #8652: bug(tui): Keyboard shortcuts don't work while Korean IME is active on macOS - related keyboard input issues
  • #8844: ctrl p won't work on vs code - other keybinding issues
  • #8774: Question prompt tabs don't support Tab/Shift-Tab navigation - related to keyboard navigation (CLOSED)

Additionally, since this involves keybinds, please refer to the pinned keybinds documentation at #4997 for more comprehensive information about keyboard-related issues.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #4997: [Pinned] Keybinds - comprehensive keybinding documentation and related issues - #8652: bug(tui): Keyboard shortcuts don't work while Korean IME is active on macOS - related keyboard input issues - #8844: ctrl p won't work on vs code - other keybinding issues - #8774: Question prompt tabs don't support Tab/Shift-Tab navigation - related to keyboard navigation (CLOSED) Additionally, since this involves keybinds, please refer to the pinned keybinds documentation at #4997 for more comprehensive information about keyboard-related issues. Feel free to ignore if none of these address your specific case.
Author
Owner

@kommander commented on GitHub (Jan 16, 2026):

Checking…

@kommander commented on GitHub (Jan 16, 2026): Checking…
Author
Owner

@kommander commented on GitHub (Jan 16, 2026):

Seems like I broke that in https://github.com/anomalyco/opentui/pull/415, will fix.

@kommander commented on GitHub (Jan 16, 2026): Seems like I broke that in [https://github.com/anomalyco/opentui/pull/415](https://github.com/anomalyco/opentui/pull/415), will fix.
Author
Owner

@kommander commented on GitHub (Jan 16, 2026):

This should work in 1.1.24 again?

@kommander commented on GitHub (Jan 16, 2026): This should work in 1.1.24 again?
Author
Owner

@fengwk commented on GitHub (Jan 17, 2026):

This should work in 1.1.24 again?

Great, it's already fixed, thank you for your work.

@fengwk commented on GitHub (Jan 17, 2026): > This should work in 1.1.24 again? Great, it's already fixed, thank you for your work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6506