Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const shortcut = ({
view,
shortcut: text,
}: KeyboardShortcutParams) => {
Keyboard.create({
target: view.dom,
batch: true,
})
.start()
.mod({ text })
.forEach(({ event }) => {
view.dispatchEvent(event);
flush(view);
});
};