SHORTCUT Property Type

It's possible to set ARRAY of type shortcut on a view to trigger actions when the key combo is pressed.

"shortcuts": [
  {
    "shortcut": "⌘Y",
    "action": { ... }
  },
  {
    "shortcut": "⌘J",
    "action": { ... }
  }
]

Shortcuts are only processed when the currently focused component is a descendant of the view with the shortcuts set, and the deepest shortcuts (e.g. at the root view) take precedence.

Tip

Use the following modifier characters to composite your shortcut string: ⌘ ⇧ ⌃ ⌥ ↩︎

Properties

shortcut
STRING

The key equivalent shortcut to trigger this action.

action
ACTION | ARRAY

Which action should be run when the shortcut is triggered.