Commit f3734bd
committed
TUI: explicit Option/Meta+Backspace word-delete +
Bind word-delete (erase previous word) explicitly and eagerly to the
escape-prefixed backspace/delete encodings — (escape, backspace) [ESC+DEL
\x1b\x7f and ESC+BS, both parse to (escape, c-h)], (escape, delete) [the
Option+forward-delete CSI], and c-w — so it's deterministic across
terminals and can't be pre-empted by the lone-escape handlers. Verified
in a real pseudo-terminal: "hello world foo" + each sequence -> "hello
world "; a plain backspace still deletes one char.
Adds `openhack --showkey`: a raw-key diagnostic that prints the exact
byte sequence a terminal sends for each keypress (e.g. Option+Backspace),
so a nonstandard encoding can be identified and bound precisely.
Claude-Session: https://claude.ai/code/session_016PMahuFwyaHhR5aUeeC1TMopenhack --showkey
1 parent 4343cf4 commit f3734bd
2 files changed
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
267 | 314 | | |
268 | 315 | | |
269 | 316 | | |
| |||
288 | 335 | | |
289 | 336 | | |
290 | 337 | | |
| 338 | + | |
291 | 339 | | |
292 | 340 | | |
293 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1359 | 1359 | | |
1360 | 1360 | | |
1361 | 1361 | | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1362 | 1379 | | |
1363 | 1380 | | |
1364 | 1381 | | |
| |||
0 commit comments