KeyDownActionsEditor:
Filter:
Classes (extension) | GUI | External Control > Keyboard

KeyDownActionsEditor : KeyDownActions : Object
ExtensionExtension

an editor allowing to set keyboard-shortcuts resp. edit the actions connmected to the shortcuts.

Description

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.

Class Methods

KeyDownActionsEditor.new(parent, name, bounds, shortcutsDict, showMods: true)

Create a new KeyDownActionsEditor for the given shortcuts in shortcutsDict

Arguments:

parent

a View - if none is provided it will get created internally

name

a String or a Symbol, added to the window's title.

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)

Returns:

a KeyDownActionsEditor

Inherited class methods

Instance Methods

.result

Query the values currently set in the editor.

Returns:

.setShortcuts(view)

Set the keyDownActions of the given View to the current values of the editor.

NOTE: Though in most cases argument 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 KeyDownActionsEditor

Returns:

this (a KeyDownActionsEditor)

.window

The editor's Window

Returns:

Inherited instance methods

Examples