import { default } from "https://deno.land/x/question@0.0.2/KeyCombo.ts";
Test this key combination against a keyboard event. These events might come
from events such as keydown
and keyup
.
Examples
Example 1
Example 1
const saveKeyCombo = KeyCombo.parse('Ctrl+S')
if (saveKeyCombo.test(keypress)) {
event.preventDefault()
console.log('Saving...')
}
Parameters
event: Keypress
The event to test this key combo against.