Class: Shortcuts

@bldr/vue-plugin-shortcuts~Shortcuts

This class is mounted under this.$shortcuts

new Shortcuts ()

Members

$router Object

$store Object

Methods

add (keys, callback, description, routeNames)

Add a shortcut.

Name Type Description
keys String

Mousetrap key specification, see the documentation.

callback function

A callback function.

description String

Some text to describe the shortcut.

routeNames Array

A list of route names. Activate this shortcut only on this routes.

addMultiple (shortcutSpecs)

A multiple shortcuts

Name Type Description
shortcutSpecs array

An array of shortcutSpec.

addRoute (route)

Name Type Description
route Object

fromRoute (route)

Name Type Description
route Object

fromRoutes (router)

Name Type Description
router object

The router object of the Vue router (this.$router)

pause ()

remove (keys)

Remove a shortcut.

Name Type Description
keys String

Mousetrap key specification, see the documentation.

removeMultiple (keysList)

Remove multiple shortcuts at once.

Name Type Description
keysList Array

An array of Mousetrap key specification.

unpause ()