import { default } from "https://deno.land/x/netzo@0.5.65/deps/question/KeyCombo.ts";
Parses a key combination from a string. The string should be in a format of
modifier keys and then an actual key. To separate different keys use a plus
(+
). Modifier keys are Ctrl
, Shift
, Alt
(Option
), and the meta key.
The meta modifier key is represented as windows logo, or on mac the text
command, can be represented as Command
, Super
, or Win
.
Examples
Example 1
Example 1
const combinations = [
KeyCombo.parse('Ctrl+s'),
KeyCombo.parse('Ctrl'),
KeyCombo.parse('Ctrl+Shift+Esc'),
KeyCombo.parse('Ctrl+Alt+Delete'),
]