Binding combos to actions

A combo represents a combination of hotkeys. More precisely, it consists of a simple hotkey plus a set of positive and/or negative signals.

  • To define a combo with a single positive signal (the typical case) invoke new Combo(code, signalName, true)

  • To bind a combo to an action, invoke inputMode.bind(actionName, combo)

HelloCombo

HelloCombo is an example application that binds 2 signals and 6 combos.

Acorus help nodes display combo bindings alongside the simple hotkey bindings, if any. For example:

  • "shift+y" means pressing y while the "shift" signal is active.

  • "noshift+y" means pressing y while "shift" is inactive.

The example provides 4 bindings to the "SIMPLEAPP_Exit" action (which displays as "exit"):

  • Esc (bound by the default input mode)

  • the "ctrl+e" combo

  • the "noshift+y" combo

  • the "shift+r" combo

Summary

  • A combo represents a combination of hotkeys, such as ctrl+c.

  • Combos can be bound to actions, much like simple hotkeys can.