MCPcopy
hub / github.com/github/hotkey / keySequence

Function keySequence

test/test.js:25–30  ·  view source on GitHub ↗
(keys, delay = 10)

Source from the content-addressed store, hash-verified

23// Simulate entering a series of keys with `delay` milliseconds in between
24// keystrokes.
25async function keySequence(keys, delay = 10) {
26 for (const nextKey of keys.split(' ')) {
27 document.dispatchEvent(new KeyboardEvent('keydown', {key: nextKey}))
28 await wait(delay)
29 }
30}
31
32describe('hotkey', function () {
33 beforeEach(function () {

Callers 1

test.jsFile · 0.85

Calls 1

waitFunction · 0.85

Tested by

no test coverage detected