(combo: string, scancodes: string[])
| 42 | * key:state pairs) must be provided — ydotool requires scancodes. |
| 43 | */ |
| 44 | export async function sendKey(combo: string, scancodes: string[]): Promise<void> { |
| 45 | const provider = resolveLinuxInputProvider(); |
| 46 | if (provider) { |
| 47 | await provider.key(combo, scancodes); |
| 48 | return; |
| 49 | } |
| 50 | |
| 51 | const { tool } = await ensureInputTool(); |
| 52 | if (tool === 'xdotool') { |
| 53 | await xdotool('key', '--clearmodifiers', combo); |
| 54 | } else { |
| 55 | await ydotool('key', ...scancodes); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | // ── Mouse actions ─────────────────────────────────────────────────────── |
| 60 |
no test coverage detected
searching dependent graphs…