import { default } from "https://deno.land/x/netzo@0.5.119/deps/question/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.