On Thu, Aug 6, 2015 at 4:52 PM, Oon-Ee Ng <ngoonee.talk@gmail.com> wrote:
On Thu, Aug 6, 2015 at 3:52 PM, Damjan Georgievski <gdamjan@gmail.com> wrote:
https://wiki.archlinux.org/index.php/Map_scancodes_to_keycodes use the hwdb (udev) way. you can set a scancode to reserved to ignore it
Thanks, that looks promising. I'll reply again as soon as I've had the chance to try this out.
A million thanks to Damjan Georgievski who solved my problem! For posterity (and myself when I inevitably google this problem again in a year or so), here's a summary:- evtest on this mouse gives:- left-to-right-swipe -> Backspace, Super_L, Control_L (7002a, 700e3, 700e0 in hex) right-to-left-swipe -> c, Super_L (70006, 700e3 in hex) cat /proc/bus/input/devices gives the following relevant details for bluetooth (above) and dongle-based (below) connections:- I: Bus=0005 Vendor=17ef Product=6060 Version=0001 N: Name="Lenovo Mice N700" P: Phys=DC:85:DE:54:9E:50 I: Bus=0003 Vendor=17ef Product=6060 Version=0111 N: Name="Dual Mode WL Touch Mouse N700" P: Phys=usb-0000:00:14.0-4/input0 This summarizes into the following /etc/udev/hwdb.d/90-LenovoN700.hwdb evdev:input:b0005v17EFp6060e0001* KEYBOARD_KEY_70006=prog1 KEYBOARD_KEY_700e3=reserved KEYBOARD_KEY_7002a=prog2 KEYBOARD_KEY_700e0=reserved evdev:input:b0003v17EFp6060e0111* KEYBOARD_KEY_70006=prog1 KEYBOARD_KEY_700e3=reserved KEYBOARD_KEY_7002a=prog2 KEYBOARD_KEY_700e0=reserved And I can then use xbindkeys or sxhkd to bind XF86Launch1 and XF86Launch2 to whatever I like =)