You can customize hot keys and change the key or key
combinations associated with actions of all keyboard accessibility
interactors, but you must register your customizations with the KeyboardInteractorManager.
The KeyboardInteractorManager is
the main component for the keyboard accessibility feature. This component
groups and manages all keyboard key interactors.
Call the assignKeyInteractorInputs method on an instance of the
Diagram class to configure a hot key, passing in the name of the interactor
and the action which you want to associate with the hot key.
For example, to change the hot key for the multiselect action
of the SelectionKeyInteractor from
Ctrl+Spacebar to Shift+Spacebar, use the following code:
var diagram = dijit.byId("diagram"); var assignment = {multiSelect:{hotKey: dojo.keys.SPACE, filter: {alt:false,shift:true} } }; diagram.assignKeyInteractorInputs("Selection",assignment);
To change the hot key for the changeNavigatorStyle action
of the Navigator interactor from
F8 to F10, use the following code:
var assignment = {changeNavigatorStyle:{hotKey: dojo.keys.F10 } }; diagram.assignKeyInteractorInputs("Navigator",assignment);