# eric4.Preferences.Shortcuts

Module implementing functions dealing with keyboard shortcuts.

### 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 write a single keyboard shortcut to the settings.
__setAction35 | Private function to write a single keyboard shortcut to the settings (old format).
exportShortcuts | Module function to export the keyboard shortcuts for the defined QActions.
importShortcuts | Module function to import the keyboard shortcuts for the defined E4Actions.
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 new format shortcuts file.
setActions_35 | Module function to set actions based on old format shortcuts file.

## __readShortcut

__readShortcut(act, category, prefClass)

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

act
  reference to the action object (E4Action)
category
  category the action belongs to (string or QString)
prefClass
  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
  reference to the action object (E4Action)
category
  category the action belongs to (string or QString)
prefClass
  preferences class used as the storage area

Up

## __setAction

__setAction(actions, sdict)

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

actions
  list of actions to set (list of E4Action)
sdict
  dictionary containg accelerator information for one category

Up

## __setAction35

__setAction35(actions, sdict)

Private function to write a single keyboard shortcut to the settings (old format).

actions
  list of actions to set (list of E4Action)
sdict
  dictionary containg accelerator information for one category

Up

## exportShortcuts

exportShortcuts(fn)

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

fn
  filename of the export file (string)

Returns:
  flag indicating success

Up

## importShortcuts

importShortcuts(fn)

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

fn
  filename of the import file (string)

Returns:
  flag indicating success

Up

## readShortcuts

readShortcuts(prefClass = Prefs, helpViewer = None)

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

prefClass
  preferences class used as the storage area
helpViewer=
  reference to the help window object

Up

## saveShortcuts

saveShortcuts(prefClass = Prefs)

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

prefClass
  preferences class used as the storage area

Up

## setActions

setActions(shortcuts)

Module function to set actions based on new format shortcuts file.

shortcuts
  dictionary containing the accelerator information read from a XML file

Up

## setActions_35

setActions_35(shortcuts)

Module function to set actions based on old format shortcuts file.

shortcuts
  dictionary containing the accelerator information read from a XML file

Up