eric7.Preferences.Shortcuts

Module implementing functions dealing with keyboard shortcuts.

Global Attributes

None

Classes

None

Functions

__readShortcut Private function to read a single keyboard shortcut from the settings.
__saveShortcut Private function to write a single keyboard shortcut to the settings.
__setAction Private function to set a single keyboard shortcut category shortcuts.
exportShortcuts Module function to export the keyboard shortcuts for the defined QActions.
importShortcuts Module function to import the keyboard shortcuts for the defined actions.
readShortcuts Module function to read the keyboard shortcuts for the defined QActions.
saveShortcuts Module function to write the keyboard shortcuts for the defined QActions.
setActions Module function to set actions based on the imported shortcuts file.


__readShortcut

__readShortcut(act, category, prefClass)

Private function to read a single keyboard shortcut from the settings.

act (EricAction)
reference to the action object
category (str)
category the action belongs to
prefClass (Prefs)
preferences class used as the storage area
Up


__saveShortcut

__saveShortcut(act, category, prefClass)

Private function to write a single keyboard shortcut to the settings.

act (EricAction)
reference to the action object
category (str)
category the action belongs to
prefClass (Prefs)
preferences class used as the storage area
Up


__setAction

__setAction(actions, shortcutsDict)

Private function to set a single keyboard shortcut category shortcuts.

actions (list of EricAction)
list of actions to set
shortcutsDict (dict)
dictionary containing accelerator information for one category
Up


exportShortcuts

exportShortcuts(fn, helpViewer=None)

Module function to export the keyboard shortcuts for the defined QActions.

fn (str)
filename of the export file
helpViewer (WebBrowserWindow)
reference to the help window object
Up


importShortcuts

importShortcuts(fn, helpViewer=None)

Module function to import the keyboard shortcuts for the defined actions.

fn (str)
filename of the import file
helpViewer (WebBrowserWindow)
reference to the help window object
Up


readShortcuts

readShortcuts(prefClass=Prefs, webBrowser=None, pluginName=None)

Module function to read the keyboard shortcuts for the defined QActions.

prefClass (Prefs)
preferences class used as the storage area
webBrowser (WebBrowserWindow)
reference to the web browser window object
pluginName (str)
name of the plugin for which to load shortcuts
Up


saveShortcuts

saveShortcuts(prefClass=Prefs, webBrowser=None)

Module function to write the keyboard shortcuts for the defined QActions.

prefClass (Prefs)
preferences class used as the storage area
webBrowser (WebBrowserWindow)
reference to the web browser window object
Up


setActions

setActions(shortcuts, helpViewer=None)

Module function to set actions based on the imported shortcuts file.

shortcuts (dict)
dictionary containing the accelerator information read from a JSON or XML file
helpViewer (WebBrowserWindow)
reference to the help window object
Up