MCPcopy Create free account
hub / github.com/callstack/agent-device / sendKey

Function sendKey

src/platforms/linux/input-actions.ts:44–57  ·  view source on GitHub ↗
(combo: string, scancodes: string[])

Source from the content-addressed store, hash-verified

42 * key:state pairs) must be provided — ydotool requires scancodes.
43 */
44export 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

Callers 4

backLinuxFunction · 0.90
homeLinuxFunction · 0.90
fillLinuxFunction · 0.85

Calls 4

ensureInputToolFunction · 0.90
xdotoolFunction · 0.85
ydotoolFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…