Package Gnumed :: Package timelinelib :: Package config :: Module shortcut |
[frames] | no frames]

# Module shortcut

source code

Naming and other conventions: All data needed for configuration of shortcuts are collected in metadata objects wich are of type Metadata. The text in a menu item to the right of the character is called shortcut. Examples of shortcuts: Ctrl+N, PgUp, Shift+Ctrl+X The shortcut, if it exists, consists of an optional modifier and a shortcut key. So the format of a shortcut is: [modifier +] shortcut_key. The text in a menu item describing the action is called function. wxid is the ID associated with the menu item. cfgid is the ID used in the configuration file associated with a shortcut.

Classes
| Metadata
| ShortcutController

Variables
| CTRL_MODIFIER = `"Ctrl"`
| ALT_MODIFIER = `"Alt"`
| NO_MODIFIER = `""`
| LABEL = `"%s->%%s"`
| LABEL_FILE = `LABEL % _("File")`
| LABEL_EDIT = `LABEL % _("Edit")`
| LABEL_VIEW = `LABEL % _("View")`
| LABEL_TIMELINE = `LABEL % _("Timeline")`
| LABEL_NAVIGATE = `LABEL % _("Navigate")`
| LABEL_HELP = `LABEL % _("Help")`
| NAVLABEL = `"%s(%s)->%%s"`
| LABEL_NAVIGATE_TIME = `NAVLABEL %(_("Navigate"), "tm")`
| LABEL_NAVIGATE_NUM = `NAVLABEL %(_("Navigate"), "num")`
| METADATA = `[Metadata(mf.ID_NEW, "shortcut_file_new", LABEL_FIL`...``
| FUNCTION_KEYS = `["PgDn", "PgUp", "F1", "F2", "F3", "F4", "F5",`...``
| SHORTCUT_KEYS = `["", "A", "B", "C", "D", "E", "F", "G", "H", "`...``
| NON_EMPTY_MODIFIERS = `["Ctrl", "Alt", "Shift+Ctrl", "Shift+Alt`...``
| MODIFIERS = `["",]+ NON_EMPTY_MODIFIERS`

Imports: mf

Variables Details

  ### METADATA Value:
      [Metadata(mf.ID_NEW, "shortcut_file_new", LABEL_FILE % _("New..."), CT
      RL_MODIFIER, "N"), Metadata(mf.ID_SAVEAS, "shortcut_save_as", LABEL_FI
      LE % _("Save As..."), NO_MODIFIER, ""), Metadata(mf.ID_IMPORT, "shortc
      ut_import", LABEL_FILE % _("Import..."), NO_MODIFIER, ""), Metadata(mf
      .ID_EXPORT, "shortcut_export", LABEL_FILE % _("Export Current view to
      Image..."), NO_MODIFIER, ""), Metadata(mf.ID_EXPORT_ALL, "shortcut_exp
      ort_all", LABEL_FILE % _("Export Whole Timeline to Images..."), NO_MOD
      IFIER, ""), Metadata(mf.ID_EXPORT_SVG, "shortcut_export_svg", LABEL_FI
      ...

  ### FUNCTION_KEYS Value:
      ["PgDn", "PgUp", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9"]

  ### SHORTCUT_KEYS Value:
      ["", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
      "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "1",
      "2", "3", "4", "5", "6", "7", "8", "9", "+", "-",]+ FUNCTION_KEYS

  ### NON_EMPTY_MODIFIERS Value:
      ["Ctrl", "Alt", "Shift+Ctrl", "Shift+Alt", "Alt+Ctrl", "Shift+Alt+Ctrl
      "]