KeyDownActionsEditor allows you to define and edit an unlimited number of key-down actions for a given GUI-element. It's based on View: -keyDownAction but adds some WYSIWYG functionality within its GUI.
To edit or remove a shortcut you'll have to click the edit-button first. The shortcut-field (next to the label "shortcut:") will get set to whatever key you hit - also during editing the action - it's advisable to first edit the action and to set the key afterwards.
Create a new KeyDownActionsEditor for the given shortcuts in shortcutsDict
parent |
a View - if none is provided it will get created internally |
name | |
bounds |
a Rect, denoting position and size |
shortcutsDict |
a Dictionary shortcuts (keys and actions) to be displayed in the editor |
showMods |
whether to expose modifier-keys in the editor (e.g. set to false for editing KeyDownActions: *globalShortcuts) |
a KeyDownActionsEditor
Set the keyDownActions of the given View to the current values of the editor.
view
will be an object of type View this doesn't necessarily have to be the case. At least the following classes do have a method keyDownAction
implemented as well: ViewHolder2, SplineGui, ScaledUserView, SMPTEView and possibly others as well well. A KeyDownActionsEditor may be used in connection with these too. Note also the corresponding class-method KeyDownActions: *setShortcuts which works independently from a given KeyDownActionsEditorthis (a KeyDownActionsEditor
)