Package peppy :: Package lib :: Module wxemacskeybindings :: Class KeyMap
[frames] | no frames]

Class KeyMap

object --+
         |
        KeyMap

Group of key mappings.

This class represents a group of key mappings. The KeyProcessor class below uses multiple groups, one to represent global keymaps, one for local keymaps, and an arbitrary number of other keymaps for any additional minor modes that need other keymappings.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
reset(self)
 
add(self, key)
return True if keystroke is processed by the handler
 
isUnknown(self)
Convience function to check whether the keystroke combo is an unknown combo.
 
define(self, acc, fcn)
Create the nested dicts that point to the function to be executed on the completion of the keystroke
 
processBindings(self, map, lookup, keys)
 
getBindings(self)
Return a dict that shows the mapping of actions to keystrokes

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods
 
matchModifier(self, str)
Find a modifier in the accerelator string
 
matchKey(self, str)
Find a keyname (not modifier name) in the accelerator string, matching any special keys or abbreviations of the special keys
 
split(self, acc)
Split the accelerator string (e.g.
 
nonEmacsName(self, acc)
Class Variables
  modifiers = ['C-', 'S-', 'A-', 'M-']
  modaccelerator = {'A-': 'Alt-', 'C-': 'Ctrl-', 'M-': 'Alt-', '...
  modaliases = {'Alt+': 'A-', 'Alt-': 'A-', 'Ctrl+': 'C-', 'Ctrl...
  keyaliases = {'ESC': 'ESCAPE', 'RET': 'RETURN', 'SPC': 'SPACE'}
  debug = False
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

split(self, acc)
Class Method

 

Split the accelerator string (e.g. "C-X C-S") into individual keystrokes, expanding abbreviations and standardizing the order of modifier keys.


Class Variable Details

modaccelerator

Value:
{'A-': 'Alt-', 'C-': 'Ctrl-', 'M-': 'Alt-', 'S-': 'Shift-'}

modaliases

Value:
{'Alt+': 'A-',
 'Alt-': 'A-',
 'Ctrl+': 'C-',
 'Ctrl-': 'C-',
 'Meta+': 'M-',
 'Meta-': 'M-',
 'Shift+': 'S-',
 'Shift-': 'S-'}