( stdin: XtermStdin, col: number, row: number, button: 0 | 1 | 2 = 0, // 0 for left, 1 for middle, 2 for right )
| 484 | }; |
| 485 | |
| 486 | export const simulateClick = async ( |
| 487 | stdin: XtermStdin, |
| 488 | col: number, |
| 489 | row: number, |
| 490 | button: 0 | 1 | 2 = 0, // 0 for left, 1 for middle, 2 for right |
| 491 | ) => { |
| 492 | // Terminal mouse events are 1-based, so convert if necessary. |
| 493 | const mouseEventString = `\x1b[<${button};${col};${row}M`; |
| 494 | await act(async () => { |
| 495 | stdin.write(mouseEventString); |
| 496 | }); |
| 497 | }; |
| 498 | |
| 499 | export const mockSettings = createMockSettings(); |
| 500 |
no test coverage detected