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
I'm experiencing the same class of issue with input_word_forward and input_word_backward. Setting them to "none" or overriding them in tui.json has no effect — alt+right/alt+left still trigger word navigation. My use case: Running OpenCode in IntelliJ's integrated terminal, where alt+right/alt+left are used for tab switching. OpenCode consumes these keys, preventing IntelliJ from handling them. tui.json config:
These defaults are always merged with user-provided keybindings via mergeKeyBindings():
// In the constructor:constmergedBindings=mergeKeyBindings(defaultTextareaKeybindings,this._keyBindings)// In the keyBindings setter:publicsetkeyBindings(bindings: KeyBinding[]){this._keyBindings=bindingsconstmergedBindings=mergeKeyBindings(defaultTextareaKeybindings,bindings)this._keyBindingsMap=buildKeyBindingsMap(mergedBindings,this._keyAliasMap)}
So even though OpenCode's config layer in packages/opencode/src/config/config.ts correctly handles "none" (via Keybind.parse("none") returning []), and textarea-keybindings.ts correctly maps the config to an empty binding list, the opentui Textarea always adds its own defaults back on top.
This affects all input_* keybinds, not just input_submit — it's the same root cause. The fix would need to happen in @opentui/core's mergeKeyBindings to allow user bindings to fully replace (not just supplement) the defaults.
Activity
github-actions commentedon Mar 2, 2026
For keybind-related issues, please also check our pinned keybinds documentation: #4997
riuoku commentedon Apr 5, 2026
I'm experiencing the same class of issue with
input_word_forwardandinput_word_backward. Setting them to"none"or overriding them intui.jsonhas no effect —alt+right/alt+leftstill trigger word navigation.My use case: Running OpenCode in IntelliJ's integrated terminal, where
alt+right/alt+leftare used for tab switching. OpenCode consumes these keys, preventing IntelliJ from handling them.tui.json config:
{ "$schema": "https://opencode.ai/tui.json", "keybinds": { "input_word_forward": "alt+f", "input_word_backward": "alt+b" } }Setting
input_word_forwardto"none"also doesn't work —alt+rightstill moves the cursor by word.Note: Below root cause analysis was performed by an AI assistant:
Root cause investigation:
The issue is in
@opentui/core'sTextareacomponent (packages/core/src/renderables/Textarea.ts). It has hardcoded default keybindings:These defaults are always merged with user-provided keybindings via
mergeKeyBindings():So even though OpenCode's config layer in
packages/opencode/src/config/config.tscorrectly handles"none"(viaKeybind.parse("none")returning[]), andtextarea-keybindings.tscorrectly maps the config to an empty binding list, the opentui Textarea always adds its own defaults back on top.This affects all
input_*keybinds, not justinput_submit— it's the same root cause. The fix would need to happen in@opentui/core'smergeKeyBindingsto allow user bindings to fully replace (not just supplement) the defaults.github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.