Debugging keyboard overlay+xbindkeys

Mariusz Mazur mariusz.g.mazur at gmail.com
Fri Nov 4 17:40:31 UTC 2016


2016-11-03 22:20 GMT+01:00 Ran Benita <ran234 at gmail.com>:
>> 4. Defined caps+f to send XF86LaunchA to start a new terminal window
>> (among other similar shortcuts, like ones for switching virtual
>> desktops, but caps+f is the worst offender, so I'll focus on that).
>
> Nice hack.

Some ground work, a gui and such multi-layer keyboard rebindings could
become standard in many a linux distro.

> Just a guess, but maybe you are hitting this?
> https://cgit.freedesktop.org/xorg/xserver/tree/xkb/xkbPrKeyEv.c?id=xorg-server-1.18.99.902#n134
>
> Try running `xbindkeys --verbose` and see its output on key
> press/relase? The problem is in one of xserver, libX11 or xbindkeys,
> this would help narrow it down.

I know the issue isn't xbindkeys-specific, since I can also trigger a
form of it both on lxde and kde4.

Ha, bingo! While writing a reply I've been poking around it again and
found a fully reliable trigger in xbindkeys. It might just well be the
code you've linked to. Here's how to do it:

Relevant changes to keymap:

     interpret Overlay1_Enable+AnyOfOrNone(all) {
-        action= LockControls(controls=Overlay1);
+        action= SetControls(controls=Overlay1);
     };

     key <AC04> {
         type= "ALPHABETIC",
+        overlay1= <I128>,
         symbols[Group1]= [               f,               F ]
     };

-    key <CAPS> {         [       Caps_Lock ] };
+    key <CAPS> {         [       Overlay1_Enable ] };

-    modifier_map Lock { <CAPS> };



Contents of .xbindkeysrc:

"echo hi"
    XF86LaunchA


Now run "xbindkeys -n -v" and in the exact order:
- press caps
- press f
- release caps
- wait
- release f

Voila. (Tested on two separate systems.)

Now, is there any chance of this getting a fix?


More information about the xorg-devel mailing list