opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Number keys from QMK keyboard layer ignored in TUI input

Open gasparev opened this issue 1 day ago • 1 comments

Description

When using a split keyboard with QMK firmware, number keys (0-9) sent via a layer-tap activation are completely ignored in the OpenCode TUI input field. Other symbols from the same layer work correctly.

Environment

  • Terminal: iTerm2 (macOS)
  • Keyboard firmware: QMK
  • Keyboard type: Split keyboard with layer-tap on space bar
  • OpenCode version: Latest

Steps to Reproduce

  1. Use a QMK-based split keyboard configured with space bar as layer-tap (hold for layer activation)
  2. Configure the layer to output numbers (0-9) and other symbols
  3. Open OpenCode TUI in iTerm2
  4. Hold space and press a key that should output a number
  5. Observe that the number is not typed

Expected Behavior

Number keys from the QMK layer should be typed into the input field, just like they work in vim, nano, and regular shell prompts.

Actual Behavior

  • Numbers (0-9): Completely ignored, nothing appears in the input
  • Other symbols from the same layer: Work correctly and appear in the input
  • Same key combination in vim/nano/shell: Works correctly

Analysis

Since other symbols from the same QMK layer work correctly but only numbers are ignored, this suggests OpenCode's TUI may be intercepting number key events for some internal purpose (possibly undocumented shortcuts or selection features) before they reach the input field.

The fact that this works in other TUI applications (vim, nano) but not in OpenCode indicates this is specific to OpenCode's key handling.

Workaround

None currently known.

gasparev avatar Jan 15 '26 11:01 gasparev