From 425ed6017a42937f69c1e8450ea8f3c6c6c20928 Mon Sep 17 00:00:00 2001 From: David Strobach Date: Thu, 17 Nov 2016 20:47:31 +0100 Subject: Middle emulation - make the emulated button number configurable Sometimes it may be desirable to remap physical middle button to something else and use emulation instead. The emulation is however hardcoded to emulate physical button 2, so the emulated button gets remapped together with the physical one. This patch adds the Emulate3Button configuration option to allow for user selection of the emulated button number and a configuration like this: Section "InputClass" Identifier "Middle button emulation config" MatchProduct ".... some device ..." MatchDriver "evdev" Option "Emulate3Buttons" "on" Option "Emulate3Button" "9" EndSection Signed-off-by: Peter Hutterer --- src/evdev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/evdev.h') diff --git a/src/evdev.h b/src/evdev.h index c506296..7081182 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -196,6 +196,7 @@ typedef struct { int state; /* state machine (see bt3emu.c) */ Time expires; /* time of expiry */ Time timeout; + uint8_t button; /* phys button to emit */ } emulateMB; /* Third mouse button emulation */ struct emulate3B { -- cgit v1.2.3