(input: string, key: Key)
| 499 | } |
| 500 | |
| 501 | private handleSpecialKeys(input: string, key: Key): boolean { |
| 502 | // Detect option key combinations through escape sequences |
| 503 | const isOptionKey = input.startsWith("\u001b") && input.length > 1; |
| 504 | |
| 505 | // Handle option key combinations (detected through escape sequences) |
| 506 | if (isOptionKey) { |
| 507 | return this.handleOptionKey(input.slice(1)); |
| 508 | } |
| 509 | |
| 510 | // Handle special key combinations based on input character |
| 511 | if (key.ctrl && this.handleCtrlKey(input)) { |
| 512 | return true; |
| 513 | } |
| 514 | |
| 515 | // Handle meta key combinations (cmd on Mac) |
| 516 | if (key.meta && this.handleMetaKey(input, key)) { |
| 517 | return true; |
| 518 | } |
| 519 | |
| 520 | // Handle arrow keys |
| 521 | if (this.handleArrowKeys(key)) { |
| 522 | return true; |
| 523 | } |
| 524 | |
| 525 | // Handle backspace/delete |
| 526 | if (this.handleDeleteKeys(key)) { |
| 527 | return true; |
| 528 | } |
| 529 | |
| 530 | return false; |
| 531 | } |
| 532 | |
| 533 | private handleTextInput(input: string): boolean { |
| 534 | // Direct paste detection: single large input - but delay insertion to catch split pastes |
no test coverage detected