MCPcopy
hub / github.com/philc/vimium / sendKeyboardEvent

Function sendKeyboardEvent

tests/dom_tests/dom_tests.js:183–195  ·  view source on GitHub ↗
(key, type, extra)

Source from the content-addressed store, hash-verified

181});
182
183const sendKeyboardEvent = (key, type, extra) => {
184 if (type == null) type = "keydown";
185 if (extra == null) extra = {};
186 handlerStack.bubbleEvent(
187 type,
188 Object.assign(extra, {
189 type,
190 key,
191 preventDefault() {},
192 stopImmediatePropagation() {},
193 }),
194 );
195};
196
197const sendKeyboardEvents = (keys) => {
198 for (const key of keys.split("")) {

Callers 2

sendKeyboardEventsFunction · 0.85
dom_tests.jsFile · 0.85

Calls 1

bubbleEventMethod · 0.80

Tested by

no test coverage detected