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

Class KeyProcessor

object --+
         |
        KeyProcessor

Driver class for key processing.

Takes multiple keymaps and looks at them in order, first the minor modes, then the local, and finally if nothing matches, the global key maps.

Instance Methods
 
__init__(self, status=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
wxkeymap(self)
 
fixmaps(self)
set up the search order of keymaps
 
addMinorKeyMap(self, keymap)
Add the keymap to the list of keymaps recognized by this processor.
 
clearMinorKeyMaps(self)
 
setGlobalKeyMap(self, keymap)
 
clearGlobalKeyMap(self)
 
setLocalKeyMap(self, keymap)
 
clearLocalKeyMap(self)
 
decode(self, evt)
Raw event processor that takes the keycode and produces a string that describes the key pressed.
 
reset(self)
reset the lookup table to the root in each keymap.
 
show(self, text)
Display the current keystroke processing in the status area
 
add(self, key)
Attempt to add this keystroke by processing all keymaps in parallel and stop at the first complete match.
 
startArgument(self, key=None)
This starts the emacs-style numeric arguments that are ended by the first non-numeric keystroke
 
getNumber(self, key, musthavectrl=False)
Helper function to decode a numeric argument keystroke.
 
argument(self, key)
Process a numeric keystroke
 
process(self, evt)
The main driver routine.

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

Class Variables
  debug = False
Properties

Inherited from object: __class__

Method Details

__init__(self, status=None)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

addMinorKeyMap(self, keymap)

 

Add the keymap to the list of keymaps recognized by this processor. Minor mode keymaps are processed in the order that they are added.

decode(self, evt)

 

Raw event processor that takes the keycode and produces a string that describes the key pressed. The modifier keys are always returned in the order C-, S-, A-, M-

add(self, key)

 

Attempt to add this keystroke by processing all keymaps in parallel and stop at the first complete match. The other way that processing stops is if the new keystroke is unknown in all keymaps. Returns a tuple (skip,unknown,function), where skip is true if the keystroke should be skipped up to the next event handler, unknown is true if the partial keymap doesn't match anything, and function is either None or the function to execute.

getNumber(self, key, musthavectrl=False)

 

Helper function to decode a numeric argument keystroke. It can be a number or, if the first keystroke, the '-' sign. If C-U is used to start the argumen processing, the numbers don't have to have the Ctrl modifier pressed.

process(self, evt)

 

The main driver routine. Get a keystroke and run through the processing chain.