Welcome to the interactive tutorial,
let's see how you can utilize Keywatch.
Please hitEnter when you are ready.
To watch for the Enter key you would have to call
where doSomething is the handler function that does stuff for you.
Enter to continue.
We can specify keyboard modifiers to further adjust if we only want to listen to key combinations.
These are Shift, Alt, Control and Meta.
The latter is Command on Macs and Win on Windows.
Each of them has a us-ascii short representation: +#^@,
and even accept the usual mac-keys ⇧⌥⌘
The following examples will trigger for the same actions
Give these key-combinations a try: {{ keyLessonsDoneCount }} / 4
PressEnter to continue
You may have noticed, that Control-D or {{ metaName }}-F may have triggered a default browser action.
In order to prevent these we have to prefix the key definition with a NoDefault (short !)
Enter to continue
You can also use more than one Modifier for a Key.
Just keep in mind that the key definition is always exact.
This means that Shift KeyA will not trigger on Shift Alt KeyA!
Enter to finish