Package pallavi :: Package plugins :: Module SimpleKeybindings
[hide private]
[frames] | no frames]

Module SimpleKeybindings

source code

This plugin listens for certain keystrokes and binds them to actions. Other
keystrokes are silently passed onto the StyledTextControl for handling. This
is the simplest way to implement keybindings, as the StyledTextControl
takes care of a lot of the work. However, it is not the most extensible, as
modifying keybindings requires editing the plugin, and we end up with a mix
of StyledTextControl keybindings and Pallavi handled keybindings. A more
extensible solution was used in Pallavi 0.1 with the keystroke_conversion plugin,
but because it was incomplete, this restricted a lot of the functionality.

Luckily, any number of keybinding plugins can be written (though perhaps they
should not all be used at once!) So in the future, a more extensible system may
be devised or some enterprising plugin developer. Ideally, I would like to see
a modal plugin (like vim interaction) and a fully customizable plugin with a keybinding
interface that lists all known user actions and allows them to be bound. And also
a simple one for people that want sleek and elegant.

This Plugin queues the following event:
        When a key has been pressed
This plugins listens for the following events:
        Sets up a keystroke listener on a textview when it has been added to the view.

Functions [hide private]
setup() source code
TextViewAdded(eventName, textview) source code
KeyDown(event) source code