AGW Logo

agw_title ShortcutEvent

ShortcutEvent is a special subclassing of wx.PyCommandEvent.

This event gets emitted when the user is about to change a shortcut (via EVT_SHORTCUT_CHANGING) and when the user has changed a shortcut (via EVT_SHORTCUT_CHANGED).

hierarchy Inheritance Diagram

Inheritance diagram for: ShortcutEvent

Inheritance diagram of ShortcutEvent


method_summary Methods Summary

__init__Default class constructor.
GetAcceleratorGets the shortcut string for which the operation was performed for EVT_SHORTCUT_CHANGED
GetOldAcceleratorReturns the previous shortcut string for EVT_SHORTCUT_CHANGED and
GetShortcutReturns the shortcut class used for EVT_SHORTCUT_CHANGED and
SetAcceleratorSets the shortcut string for which the operation was performed for EVT_SHORTCUT_CHANGED
SetOldAcceleratorSets the previous shortcut string for EVT_SHORTCUT_CHANGED and
SetShortcutSets the shortcut class used for EVT_SHORTCUT_CHANGED and

API Class API

class ShortcutEvent(wx.PyCommandEvent)[source]

ShortcutEvent is a special subclassing of wx.PyCommandEvent.

This event gets emitted when the user is about to change a shortcut (via EVT_SHORTCUT_CHANGING) and when the user has changed a shortcut (via EVT_SHORTCUT_CHANGED).



__init__(evtType, evtId)[source]

Default class constructor. For internal use: do not call it in your code!

Parameters:
  • evtType (integer) – the event type;
  • evtId (integer) – the event identifier.


GetAccelerator()[source]

Gets the shortcut string for which the operation was performed for EVT_SHORTCUT_CHANGED and EVT_SHORTCUT_CHANGING events.

Returns:A string representing the new shortcut string (accelerator).


GetOldAccelerator()[source]

Returns the previous shortcut string for EVT_SHORTCUT_CHANGED and EVT_SHORTCUT_CHANGING events.

Returns:A string representing the old shortcut string (accelerator).


GetShortcut()[source]

Returns the shortcut class used for EVT_SHORTCUT_CHANGED and EVT_SHORTCUT_CHANGING events.

Returns:An instance of Shortcut.


SetAccelerator(accelerator)[source]

Sets the shortcut string for which the operation was performed for EVT_SHORTCUT_CHANGED and EVT_SHORTCUT_CHANGING events.

Parameters:accelerator (string) – a string representing the new shortcut string (accelerator).


SetOldAccelerator(accelerator)[source]

Sets the previous shortcut string for EVT_SHORTCUT_CHANGED and EVT_SHORTCUT_CHANGING events.

Parameters:accelerator (string) – a string representing the old shortcut string (accelerator).


SetShortcut(shortcut)[source]

Sets the shortcut class used for EVT_SHORTCUT_CHANGED and EVT_SHORTCUT_CHANGING events.

Parameters:shortcut – an instance of Shortcut.
Tree

Table Of Contents

Previous topic

ShortcutEditor

Next topic

shortcuteditor functions