So, I've been using Elementary OS for a long time and one day I decided to install Gnome DE for variety. I started to customizing it for myself and everything was ok, until I got to xbindkeys. I'm using this program in my Pantheon DE (default DE for Elementary OS) for mapping mouse arrows as desktop switchers - it's very comfortable.
So in Gnome (Xorg) it works at half. In the US keyboard layout everything is good, it works very well. But when I switch to the Russian keyboard layout it just stops working. The daemon is still working, but nothing happens. I decided to run
xbindkeys -v to get more information. I realized that e.xbutton.button is the same in all layouts, but e.xbutton.state is strange in the Russian layout - 8208. I found this post, got the patch from it, got the xbindkeys source by typing:
git clone http://git.savannah.gnu.org/cgit/xbindkeys.git. Git didn't want to apply the patch by
git apply -v xbindkeys_patch.patch – it says it can't find the wanted line. I opened the file which should be edited, and realized that it already has this fixed. Very interesting! I built it and installed it as described in the 'INSTALL' file:
$ ./configure $ make $ sudo make install
Now the following happened: xbindkeys now received mouse button in Russian layout and switches desktops, but... it takes a second or 1.5 seconds. On the US layout everything works immediately like before.
I decided to dig deeper. Using the best debugging principles (printf-debuging) I found a problem in the source code. This program uses Xlib API and it calls the XNextEvent() function, which takes this extreme amount of time on the Russian layout.
So it happens only in Gnome session. And I don't know what to do next. I would appreciate any help.