HUD gets activated by Thinkpad USB Keyboard's back and forward buttons
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unity-2d |
Fix Released
|
Medium
|
Albert Astals Cid | ||
unity-2d (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Test case:
1. Download attachment foo.c (https:/
2. Install xtst:
sudo apt-get install libxtst-dev
3. Compile the code with
g++ foo.c -o XFakeKey `pkg-config --libs --cflags x11 xtst`
4. Run ./XFakeKey Alt_L Left
-> The HUD should not appear
===
This is on Ubuntu 12.04 beta using unity-2d 5.8.0-0ubuntu1.
I use a Thinkpad USB Keyboard on my desktop, which has "back" and "forward" buttons just above the arrow keys (as found on Thinkpad laptops). They seem to act a bit differently to the keyboards found on laptops though, since instead of generating their own scan codes, they generate "Alt+Left" and "Alt+Right" key presses.
For instance, pressing the "back" button in xev results in the following events:
KeyPress event, serial 30, synthetic NO, window 0x3a00001,
root 0x15f, subw 0x0, time 434986370, (445,143), root:(512,231),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
KeyPress event, serial 30, synthetic NO, window 0x3a00001,
root 0x15f, subw 0x0, time 434986370, (445,143), root:(512,231),
state 0x8, keycode 113 (keysym 0xff51, Left), same_screen YES,
And releasing the key results in:
KeyRelease event, serial 33, synthetic NO, window 0x3a00001,
root 0x15f, subw 0x0, time 434986498, (445,143), root:(512,231),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
KeyRelease event, serial 33, synthetic NO, window 0x3a00001,
root 0x15f, subw 0x0, time 434986498, (445,143), root:(512,231),
state 0x0, keycode 113 (keysym 0xff51, Left), same_screen YES,
If I press and release the key quick enough, this often has the effect of bringing up the HUD as well as causing my web browser to navigate to the previous page.
This behaviour is surprising to me: there is clearly a second key press in the event stream between the "Alt" key press and release, which I would have thought would be enough to inhibit the HUD from popping up.
Related branches
- Gerry Boland (community): Approve
-
Diff: 600 lines (+136/-252)9 files modifiedlibunity-2d-private/src/CMakeLists.txt (+0/-1)
libunity-2d-private/src/keyboardmodifiersmonitor.cpp (+0/-162)
libunity-2d-private/src/keyboardmodifiersmonitor.h (+0/-69)
libunity-2d-private/src/keymonitor.cpp (+83/-3)
libunity-2d-private/src/keymonitor.h (+13/-3)
libunity-2d-private/tests/CMakeLists.txt (+3/-1)
libunity-2d-private/tests/keymonitortest.cpp (+31/-6)
panel/applets/appname/appnameapplet.cpp (+3/-3)
shell/app/shellmanager.cpp (+3/-4)
Changed in unity-2d: | |
assignee: | nobody → Albert Astals Cid (aacid) |
status: | Triaged → In Progress |
Changed in unity-2d: | |
milestone: | none → 5.12 |
status: | In Progress → Fix Committed |
description: | updated |
Changed in unity-2d: | |
status: | Fix Committed → Fix Released |
description: | updated |
Here's my try to reproduce, exactly the same sequence... and no HUD :/
KeyPress event, serial 33, synthetic NO, window 0x4c00001,
root 0xaf, subw 0x0, time 72005151, (1022,585), root:(1023,637),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 33, synthetic NO, window 0x4c00001,
root 0xaf, subw 0x0, time 72005311, (1022,585), root:(1023,637),
state 0x8, keycode 113 (keysym 0xff51, Left), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
root 0xaf, subw 0x0, time 72005510, (1022,585), root:(1023,637),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
root 0xaf, subw 0x0, time 72005730, (1022,585), root:(1023,637),
state 0x0, keycode 113 (keysym 0xff51, Left), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False