Hotkeys like the demo?

Checkout the Keyboard service that handles event registration and so forth.

You can automatically activate it by passing a keyboard.bindTo=DOMElement configuration property to BpmnJS:

var modeler = new BpmnJS({ keyboard: { bindTo: document }, ... });

Manual activation/deactivation works, too:

modeler.get('keyboard').bind(document);
modeler.get('keyboard').unbind();
5 Likes