Creates a shortcut either using a shorthand notation to encode the
keycode a in the caption or one that reacts to the given KeyCode and (optionally) ModifierKeys.
The shortcut might be shown in the UI (e.g context menu), in which
case the caption will be used.
Insert one or more modifier characters before the character to use as
keycode. E.g "&Save" will make a shortcut
responding to ALT-S, "E^xit" will respond to
CTRL-X.<br/> Multiple modifiers can be used, e.g
"&^Delete" will respond to CTRL-ALT-D (the
order of the modifier characters is not important).
The modifier characters will be removed from the caption. The modifier
character is be escaped by itself: two consecutive characters are turned
into the original character w/o the special meaning. E.g
"Save&&&close" will respond to ALT-C,
and the caption will say "Save&close".
- Parameters:
args - tuple of the form
-
(caption, kc, m)
-
used when displaying the shortcut visually
-
KeyCode that the shortcut reacts to
-
optional modifier keys
-
(caption, icon, kc, m)
-
used when displaying the shortcut visually
-
used when displaying the shortcut visually
-
KeyCode that the shortcut reacts to
-
optional modifier keys
-
(shorthandCaption)
-
the caption in modifier shorthand
-
(shorthandCaption, modifierKeys)
-
the caption in modifier shorthand
-
modifier keys
- Overrides:
object.__init__
- (inherited documentation)
|