Shortcuts

Description#


By default keyboard shortcuts are provided to make it easier to interact with the theme, but it is possible to define specific shortcuts through a minimum of configuration. For example, it is possible to get the list of available shortcuts using the shortcut Shift + k.

Define a specific shortcut#


To define a shortcut, follow this process (example with the example (Maj + 1) shortcut from the theme website):

  1. Define the general configuration of the shortcut in the site specific configuration file (Cf. highlighted lines below):
    config.toml ([params] section)
  2. Define shortcut labels that will appear in the shortcut help menu (in the appropriate i18n translation file):
    en.yaml
  3. Define the javascript code associated with the shortcut and called through the function defined in step 1:
    shortcuts.js