@nospamproxy/core
    Preparing search index...

    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>
    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:

    • ctrl+a
    • ctrl+shift+s
    • ctrl+space
    • arrowup

    Implements

    • ICustomAttributeViewModel
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    value: Hotkeys | Hotkeys[]

    Methods

    • Returns void