eric3.Preferences.ShortcutsHandler

Module implementing the handler class for reading a keyboard shortcuts file.

Classes

ShortcutsHandler Class implementing a sax handler to read a keyboard shortcuts file.

Functions

None

ShortcutsHandler

Class implementing a sax handler to read a keyboard shortcuts file.

Derived from

XMLSAXHandler

Methods

ShortcutsHandler Constructor
characters Handler called for ordinary text.
defaultStartElement Handler method for common start tags.
endAccel Handler method for the "Accel" end tag.
endElement Handler called, when an ending tag is found.
endName Handler method for the "Name" end tag.
endShortcut Handler method for the "Shortcut" end tag.
getShortcuts Public method to retrieve the shortcuts.
startDocument Handler called, when the document parsing is started.
startElement Handler called, when a starting tag is found.
startShortcut Handler method for the "Shortcut" start tag.
utf8_to_code Private method to convert a string to unicode and encode it for XML.

ShortcutsHandler (Constructor)

ShortcutsHandler()

Constructor

ShortcutsHandler.characters

characters(chars)

Handler called for ordinary text.

chars
the scanned text (string)

ShortcutsHandler.defaultStartElement

defaultStartElement(attrs)

Handler method for common start tags.

attrs
list of tag attributes

ShortcutsHandler.endAccel

endAccel()

Handler method for the "Accel" end tag.

ShortcutsHandler.endElement

endElement(name)

Handler called, when an ending tag is found.

name
name of the tag (string)

ShortcutsHandler.endName

endName()

Handler method for the "Name" end tag.

ShortcutsHandler.endShortcut

endShortcut()

Handler method for the "Shortcut" end tag.

ShortcutsHandler.getShortcuts

getShortcuts()

Public method to retrieve the shortcuts.

Returns:
Dictionary of dictionaries of shortcuts. The keys of the dictionary are the categories, the values are dictionaries. These dictionaries have the shortcut name as their key and the accelerator as their value.

ShortcutsHandler.startDocument

startDocument()

Handler called, when the document parsing is started.

ShortcutsHandler.startElement

startElement(name, attrs)

Handler called, when a starting tag is found.

attrs
list of tag attributes
name
name of the tag (string)

ShortcutsHandler.startShortcut

startShortcut(attrs)

Handler method for the "Shortcut" start tag.

attrs
list of tag attributes

ShortcutsHandler.utf8_to_code

utf8_to_code(text)

Private method to convert a string to unicode and encode it for XML.

text
the text to encode (string)

Up