Skip to content

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

Closed

Description

@fengwk

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

anomalyco/opentui#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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 16, 2026
  2. github-actions commented on Jan 16, 2026

    @github-actions
    Contributor

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

    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.

  3. kommander commented on Jan 16, 2026

    @kommander
    Contributor

    Checking…

  4. kommander commented on Jan 16, 2026

    @kommander
    Contributor

    Seems like I broke that in anomalyco/opentui#415, will fix.

  5. kommander commented on Jan 16, 2026

    @kommander
    Contributor

    This should work in 1.1.24 again?

  6. fengwk commented on Jan 17, 2026

    @fengwk
    Author

    This should work in 1.1.24 again?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions