10 lines
202 B
JavaScript
10 lines
202 B
JavaScript
|
export const keyboardDownEvent = (code, metaKey = false, ctrlKey = false) => {
|
||
|
const e = new CustomEvent('keydown');
|
||
|
|
||
|
e.keyCode = code;
|
||
|
e.metaKey = metaKey;
|
||
|
e.ctrlKey = ctrlKey;
|
||
|
|
||
|
return e;
|
||
|
};
|