aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar keis <keijser@gmail.com>2009-10-14 18:20:02 +0200
committerGravatar keis <keijser@gmail.com>2009-10-15 04:04:19 +0200
commit7ed6303f3d5dd02ec900fc5dcad4c977c465b0c6 (patch)
treedd9f27451362de8a543c7342535d71c8a0dc65f7 /examples
parent3be7f04d436a7a08ae0ea33d73cc4c73173ae63b (diff)
add event to execute current keycmd.
Diffstat (limited to 'examples')
-rw-r--r--examples/data/uzbl/scripts/plugins/keycmd.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/data/uzbl/scripts/plugins/keycmd.py b/examples/data/uzbl/scripts/plugins/keycmd.py
index 467053b..c5a8f93 100644
--- a/examples/data/uzbl/scripts/plugins/keycmd.py
+++ b/examples/data/uzbl/scripts/plugins/keycmd.py
@@ -318,6 +318,12 @@ def keycmd_backspace(uzbl, _foo):
update_event(uzbl, k, False)
+def keycmd_exec_current(uzbl, _foo):
+ k = get_keylet(uzbl)
+ uzbl.event('KEYCMD_EXEC', k)
+ clear_keycmd(uzbl)
+
+
def set_cursor_pos(uzbl, index):
'''Allow setting of the cursor position externally. Supports negative
indexing.'''
@@ -348,6 +354,7 @@ def init(uzbl):
'SET_KEYCMD': set_keycmd,
'KEYCMD_STRIP_WORD': keycmd_strip_word,
'KEYCMD_BACKSPACE': keycmd_backspace,
+ 'KEYCMD_EXEC_CURRENT': keycmd_exec_current,
'SET_CURSOR_POS': set_cursor_pos}
uzbl.connect_dict(connects)