[GH-ISSUE #544] Starting from opencode 1.1.22, shift+enter and ctrl+enter are not working. #915

Closed
opened 2026-03-14 09:01:50 +03:00 by kerem · 0 comments
Owner

Originally created by @fengwk on GitHub (Jan 16, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/544

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/opencode/issues/8926

Originally created by @fengwk on GitHub (Jan 16, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/544 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/opencode/issues/8926
kerem closed this issue 2026-03-14 09:01:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#915
No description provided.