Uzbl

Tasklist

FS#277 - Button2 events broken

Attached to Project: Uzbl
Opened by Steve Cain (stvc) - 2011-07-27 06:16:20 AM
Last edited by Brendan Taylor (bct) - 2011-07-31 06:47:20 PM
Task Type Bug Report
Category uzbl-browser & sample material
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I just updated from an older version and I found that middle mouse button (Button2) events broke. I did a bisect and found that commit 06c8a781c660b573ac64eb40cace7aa81add3312 is the culprit. To fix, you can either undo that specific commit, or apply this patch:

diff --git a/examples/data/plugins/keycmd.py b/examples/data/plugins/keycmd.py
index 1bb70e3..d0ec77b 100644
--- a/examples/data/plugins/keycmd.py
+++ b/examples/data/plugins/keycmd.py
@@ -216,10 +216,13 @@ def inject_str(str, index, inj):
def parse_key_event(uzbl, key):
''' Build a set from the modstate part of the event, and pass all keys thro
keylet = uzbl.keylet
-
- modstate, key = splitquoted(key)
- modstate = set(['<%s>' % keylet.modmap_key(k) for k in modstate.split('|')

+ if ' ' in key:
+ modstate, key = splitquoted(key)
+ modstate = set(['<%s>' % keylet.modmap_key(k) for k in modstate.split('
+ else:
+ modstate = set()
+
key = keylet.modmap_key(key)
return modstate, key

This task depends upon

Closed by  Brendan Taylor (bct)
2011-07-31 06:47:20 PM
Reason for closing:  Fixed
Additional comments about closing:  thanks! merged into experimental, will release again soon.
Comment by Steve Cain (stvc) - 2011-07-27 06:18:52 AM
Oops, I screwed up the patch:

diff --git a/examples/data/plugins/keycmd.py b/examples/data/plugins/keycmd.py
index 1bb70e3..d0ec77b 100644
--- a/examples/data/plugins/keycmd.py
+++ b/examples/data/plugins/keycmd.py
@@ -216,10 +216,13 @@ def inject_str(str, index, inj):
def parse_key_event(uzbl, key):
''' Build a set from the modstate part of the event, and pass all keys through modmap '''
keylet = uzbl.keylet
-
- modstate, key = splitquoted(key)
- modstate = set(['<%s>' % keylet.modmap_key(k) for k in modstate.split('|') if k])

+ if ' ' in key:
+ modstate, key = splitquoted(key)
+ modstate = set(['<%s>' % keylet.modmap_key(k) for k in modstate.split('|') if k])
+ else:
+ modstate = set()
+
key = keylet.modmap_key(key)
return modstate, key

Comment by spc (specnaz) - 2011-07-30 06:42:24 PM
Yap. I can confirm that, middle click is no more. Recent two releases from July are affected so is current git. It's very galling, i hope it's not by design.
Steve, I tried to apply your patch with: patch -p1

and i get each time:

patch: **** malformed patch at line 6: def parse_key_event(uzbl, key):

Maybe this will help...
Cheers.

Comment by Steve Cain (stvc) - 2011-07-30 10:49:10 PM
Oh, I didn't notice leading whitespace got trimmed.
Here's the actual patch: http://pastebin.com/DKPyfJ4Y

Loading...