[arch-general] Additional mouse (Lenovo N700) gesture binding

Oon-Ee Ng ngoonee.talk at gmail.com
Thu May 14 09:53:22 UTC 2015


On Wed, Apr 22, 2015 at 10:34 AM, Oon-Ee Ng <ngoonee.talk at gmail.com> wrote:q
<snip>
> Firstly, regarding the gestures, here's what I obtain from xinput
> test. I've also listed which keys these correspond to.
>
> Left swipe:-
> key press   22                  Backspace
> key press   133                Super_L (left Windows key)
> key press   37                  Control_L
> key release 22                  Backspace
> key release 133                Super_L (left Windows key)
> key release 37                  Control_L
>
> Right swipe:-
> key press   54                  c
> key press   133                Super_L (left Windows key)
> key release 54                  c
> key release 133                Super_L (left Windows key)
<snip>
> How can I bind gestures to the above? Is it possible, for example, to
> bind keys to a specific input device (so for example I can bind to the
> letter c but only from the mouse, not from my keyboard)? Or something
> involving xmodmap?

It's been a month, and off and on I've been looking at this more. It
appear xkb allows per-device settings, but I've run into several
roadblocks.

First, I can obtain the current settings using xkbcomp $DISPLAY
file.xkb, I then edit it to replace the letter 'c' with the letter
'q'.

To test, when I use file.xkb (xkbcomp file.xkb $DISPLAY) this works as
expected. Of course, I then reset it to the original behaviour because
I don't really want to not be able to type the letter c at all.

However, when I try to specify only a specific device (in my case the
bluetooth mouse on id 14), this does not seem to change anything. My
keyboard works the same (c does not change to q) and the mouse also
outputs c rather than q. However after trying to 'type' c on the
mouse, my keyboard then outputs q instead of c. This is despite the
fact that the keyboard should be id 11.

This behaviour sometimes seems to happen the other way as well, a
change (c becomes q) in the id 11 keyboard may suddenly affect the
mouse, not immediately, but after typing some characters for testing.

Does anyone have any idea what could be going on? Could this all just
be a limitation of trying to use xkb with a bluetooth mouse?


More information about the arch-general mailing list