(input: string, key: Key)
| 560 | } |
| 561 | |
| 562 | handleInput(input: string, key: Key): boolean { |
| 563 | // Handle bracketed paste sequences first |
| 564 | if (this.handleBracketedPaste(input)) { |
| 565 | return true; |
| 566 | } |
| 567 | |
| 568 | // If we're in paste mode, accumulate the pasted content but DON'T insert it yet |
| 569 | if (this._inPasteMode) { |
| 570 | this._pasteBuffer += input; |
| 571 | // Don't insert text during paste mode - wait until paste ends |
| 572 | return true; |
| 573 | } |
| 574 | |
| 575 | // Handle special keys (option, ctrl, meta, arrows, delete) |
| 576 | if (this.handleSpecialKeys(input, key)) { |
| 577 | return true; |
| 578 | } |
| 579 | |
| 580 | // Handle regular text input |
| 581 | const isOptionKey = input.startsWith("\u001b") && input.length > 1; |
| 582 | if (input && input.length >= 1 && !key.ctrl && !key.meta && !isOptionKey) { |
| 583 | return this.handleTextInput(input); |
| 584 | } |
| 585 | |
| 586 | return false; |
| 587 | } |
| 588 | |
| 589 | // Helper method to render text with cursor |
| 590 | renderWithCursor(placeholder?: string): { |
no test coverage detected