Package peppy :: Package plugins :: Module keyboard :: Class KeyboardConf
[frames] | no frames]

Class KeyboardConf

               object --+        
                        |        
    yapsy.IPlugin.IPlugin --+    
                            |    
               object --+   |    
                        |   |    
lib.userparams.ClassPrefs --+    
                            |    
               object --+   |    
                        |   |    
         debug.debugmixin --+    
                            |    
   yapsy.plugins.IPeppyPlugin --+
                                |
                               KeyboardConf

Loader for keyboard configurations.

Keyboard accelerator settings are made in the application
configuration file peppy.cfg in the user's configuration
directory.  In the file, the section KeyboardConf is used to map
an action name to its keyboard accelerator.

For example:

  [KeyboardConf]
  Copy = C-C
  Open = C-X C-F
  SaveAs = None
  Help = default

will set the keyboard accelerators for the Copy and Open actions,
remove any keyboard accelerator from SaveAs, and use the
application's default setting for Help.  Additionally, if an
action doesn't appear in the KeyboardConf section it will also use
the application's default value (which is specified in the source
code.)

Nested Classes

Inherited from lib.userparams.ClassPrefs: __metaclass__

Instance Methods
 
configDefault(self, fh=sys.stdout)

Inherited from yapsy.plugins.IPeppyPlugin: __init__, activate, activateHook, deactivate, deactivateHook

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

    convenience

Inherited from yapsy.plugins.IPeppyPlugin: importModule, isInUse

    interface
 
addCommandLineOptions(self, parser)
Add any options to the OptionParser instance.
 
processCommandLineOptions(self, options)
Process the results of any command line options of interest.
 
requestedShutdown(self)
Give the plugin a chance to revoke a shutdown.
 
getKey(self, action)
 
load(self)
 
getActions(self)
Return list of actions provided by the plugin.

Inherited from yapsy.plugins.IPeppyPlugin: aboutFiles, attemptOpen, finalShutdown, getCompatibleActions, getCompatibleMajorModes, getCompatibleMinorModes, getMajorModes, getMinorModes, getPipe, getSidebars, initialActivation, loadVirtualFileSystem, supportedShells

Class Methods

Inherited from yapsy.plugins.IPeppyPlugin: setStartupComplete

Inherited from debug.debugmixin: dprint

Class Variables
  valid_platforms = ['system default', 'win', 'emacs', 'mac']
  default_classprefs = ChoiceParam('key_bindings', valid_platfor...
  platform = 'win'
  ignore_list = ['MajorAction', 'MinibufferAction']
  classprefs = <peppy.lib.userparams.PrefsProxy object at 0x8ec3...

Inherited from yapsy.plugins.IPeppyPlugin: preferences_tab

Inherited from lib.userparams.ClassPrefs: preferences_sort_weight

Inherited from debug.debugmixin: debuglevel

Properties

Inherited from object: __class__

Method Details

addCommandLineOptions(self, parser)

 

Add any options to the OptionParser instance.

If the plugin defines any command line options, add each option to the OptionParser instance passed into this method.

Overrides: yapsy.plugins.IPeppyPlugin.addCommandLineOptions
(inherited documentation)

processCommandLineOptions(self, options)

 

Process the results of any command line options of interest.

The options dict that results from OptionPorser.parse_args() is passed in to this method, so if the plugin defined any options in addCommandLineOptions, it should process the results here.

Overrides: yapsy.plugins.IPeppyPlugin.processCommandLineOptions
(inherited documentation)

requestedShutdown(self)

 

Give the plugin a chance to revoke a shutdown.

Throw an exception to revoke a shutdown. The error message will be displayed to the user.

Overrides: yapsy.plugins.IPeppyPlugin.requestedShutdown
(inherited documentation)

getActions(self)

 

Return list of actions provided by the plugin.

Return an iterator containing the list of actions that are provided by this plugin. Actions are defined as subclasses of the SelectAction class in menu.py. They define the menubar, toolbar, and keyboard control commands.

Overrides: yapsy.plugins.IPeppyPlugin.getActions
(inherited documentation)

Class Variable Details

default_classprefs

Value:
ChoiceParam('key_bindings', valid_platforms, 'system default', 'Platfo\
rm type from which to emulate the\ndefault keybindings.'),

classprefs

Value:
<peppy.lib.userparams.PrefsProxy object at 0x8ec3150>