aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar keis <keijser@gmail.com>2011-03-14 20:53:31 +0100
committerGravatar Brendan Taylor <whateley@gmail.com>2011-04-18 20:23:43 -0600
commit354d530231cb06fb8aa046b1a6442586aec8847f (patch)
tree0c774ba5fc9af3e4bdaad04a5740752875b5a622 /examples
parent16f10abea2c634b462ba7157e63383b076b75bcc (diff)
keycmd comments and docs
Diffstat (limited to 'examples')
-rw-r--r--examples/data/plugins/keycmd.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/data/plugins/keycmd.py b/examples/data/plugins/keycmd.py
index 952fbac..99f92af 100644
--- a/examples/data/plugins/keycmd.py
+++ b/examples/data/plugins/keycmd.py
@@ -228,11 +228,10 @@ def key_press(uzbl, key):
'''Handle KEY_PRESS events. Things done by this function include:
1. Ignore all shift key presses (shift can be detected by capital chars)
- 3. In non-modcmd mode:
+ 2. In non-modcmd mode:
a. append char to keycmd
- 4. If not in modcmd mode and a modkey was pressed set modcmd mode.
- 5. If in modcmd mode the pressed key is added to the held keys list.
- 6. Keycmd is updated and events raised if anything is changed.'''
+ 3. If not in modcmd mode and a modkey was pressed set modcmd mode.
+ 4. Keycmd is updated and events raised if anything is changed.'''
k = uzbl.keylet
modstate, key = parse_key_event(uzbl, key)
@@ -270,10 +269,8 @@ def key_press(uzbl, key):
def key_release(uzbl, key):
'''Respond to KEY_RELEASE event. Things done by this function include:
- 1. Remove the key from the keylet held list.
- 2. If in a mod-command then raise a MODCMD_EXEC.
- 3. Check if any modkey is held, if so set modcmd mode.
- 4. Update the keycmd uzbl variable if anything changed.'''
+ 1. If in a mod-command then raise a MODCMD_EXEC.
+ 2. Update the keycmd uzbl variable if anything changed.'''
k = uzbl.keylet
modstate, key = parse_key_event(uzbl, key)
modstate = set([m for m in modstate if not k.key_ignored(m)])