(text: string)
| 81 | |
| 82 | // Helper to simulate the start of a paste, without the end. |
| 83 | startPaste(text: string) { |
| 84 | if (this.isLegacy) { |
| 85 | this.emit('data', Buffer.from('\x1B[200~' + text)); |
| 86 | } else { |
| 87 | this.emit('keypress', null, { name: 'paste-start' }); |
| 88 | this.emit('keypress', null, { sequence: text }); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | // Helper to simulate a single keypress event. |
| 93 | pressKey(key: Partial<Key>) { |