Custom attribute for attaching hotkey event handlers to elements.
Note, that hotkeys are only dispatched, if the element with the hotkeys attribute or any element within is focused.
Usage:
<template hotkeys.bind="{ 'ctrl+shift+s': saveAs }"> ...</template> Copy
<template hotkeys.bind="{ 'ctrl+shift+s': saveAs }"> ...</template>
class MyVM { private saveAs = () => { // ... // Unless "true" is returned, preventDefault and stopImmediatePropagation is called on the event. }} Copy
class MyVM { private saveAs = () => { // ... // Unless "true" is returned, preventDefault and stopImmediatePropagation is called on the event. }}
Hotkey names are in the following form (all lowercase):
[ctrl+][alt+][shift+]key
Example names are:
Custom attribute for attaching hotkey event handlers to elements.
Note, that hotkeys are only dispatched, if the element with the hotkeys attribute or any element within is focused.
Usage:
Hotkey names are in the following form (all lowercase):
Example names are: