On macOS every native text field deletes the previous word on Option+Backspace and deletes to the start of the line on Cmd+Backspace. Every Input widget in ThreadHop ignores both — the chord falls through as a no-op and the user is stuck deleting one character at a time. Since ThreadHop is macOS-only (per the README's ps/lsof note) this is a papercut the platform users hit every time they want to retype a search or filter.
1. What happens today
Textual's Input widget ships one delete binding: backspace → delete_left. The actions the standard library already implements but does not bind are:
action_delete_left_word— delete the word before the caretaction_delete_left_all— delete everything before the caret (line-start)action_delete_right_word/action_delete_right_all— the forward equivalents
So the capability exists; only the keymap is missing. On a US macOS terminal:
Option+BackspaceemitsESC DEL(\x1b\x7f), which Textual exposes as the key namealt+backspace— unbound inInputby default.Cmd+Backspaceis usually swallowed by the terminal itself, but Terminal.app and iTerm2 let the user remap it to sendCtrl+U(\x15).ctrl+uis also unbound by default.Option+Delete(forward) andCmd+Delete(forward) have the same story on the right-delete side.
Net result: the only way to clear a search box is holding Backspace.
2. Affected surfaces
All inherit the same default bindings — fixing the base class fixes every site at once.
threadhopSearchScreen—#search-input(line ~2611)threadhopBookmarkBrowserScreen—#bookmark-input(line ~3012)threadhopLabelPromptScreen—#label-input(line ~3236)threadhopFindBar—#find-input(line ~3500)- Transcript reply input in the main
ClaudeSessionslayout (sameInputclass)
3. Direction
Two reasonable shapes. Prefer the subclass — scoping the bindings to a ThreadHop-owned widget keeps the behaviour predictable if Textual changes its own defaults upstream.
Option A — subclass once, swap everywhere. Introduce a MacInput(Input) with a BINDINGS extension:
BINDINGS = [
Binding(\"alt+backspace\", \"delete_left_word\", show=False),
Binding(\"ctrl+w\", \"delete_left_word\", show=False), # readline parity
Binding(\"ctrl+u\", \"delete_left_all\", show=False), # Cmd+Backspace via terminal remap
Binding(\"alt+delete\", \"delete_right_word\", show=False),
Binding(\"ctrl+k\", \"delete_right_all\", show=False),
]Replace the four+1 Input(...) call sites with MacInput(...).
Option B — bind on each screen. Add the same keybinds screen by screen. Cheaper diff, but drifts the moment a new input surface lands.
Cmd+Backspace caveat
Cmd+<key> is owned by the terminal on macOS, not the TTY-connected app. We can honour it only when the user maps Cmd+Backspace → Ctrl+U in their terminal profile. That's a one-line docs note in INSTALL-MACOS.md ("For Cmd+Backspace to clear the line, add a keybinding in Terminal → Settings → Profiles → Keyboard sending \\x15."). Users who don't map it still get Option+Backspace word-delete, which covers the 80% case.
4. Action items
- Add a
MacInput(Input)(or equivalent) inthreadhopwith bindings foralt+backspace,ctrl+w,ctrl+u,alt+delete,ctrl+k - Swap the four+1
Input(...)call sites to the new class (search, bookmark filter, label prompt, find bar, transcript reply) - Verify on Terminal.app and iTerm2 that
alt+backspacearrives asESC DEL(default in both; no profile changes needed) - Document the Terminal / iTerm profile tweak for
Cmd+Backspace→Ctrl+UinINSTALL-MACOS.md - Smoke test in each modal: type a multi-word query, word-delete back to empty, retype; confirm no stray
\\x7frenders in the field
References
threadhop— the fourInput(...)call sites listed in §2- Textual
Inputwidget —action_delete_left_word,action_delete_left_all,action_delete_right_word,action_delete_right_allalready exist upstream; only the defaultBINDINGSlist omits them INSTALL-MACOS.md— natural home for theCmd+Backspaceterminal-profile note- README's macOS-only scoping (
ps/lsofsession detection) — reason this papercut is 100% of users, not a subset
Activity
0No activity yet.