Middle Button Emulation via Quirks for Kensington Orbit Scroll Wheel
This is a follow on from #133 (closed)
I have a trackball with a scroll wheel that was marketed as "Kensington Orbit Scrollwheel". It has no middle button so I had previously been using middle button emulation but this stopped working when upgrading libinput to 1.12.
As requested here is the initial output from libinput record:
version: 1
ndevices: 1
libinput:
version: "1.12.0"
git: "unknown"
system:
kernel: "4.18.8-arch1-1-ARCH"
dmi: "dmi:bvnAmericanMegatrendsInc.:bvr1502:bd11/09/2012:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnP8Z77-VLX:rvrRevX.0x:cvnChassisManufacture:ct3:cvrChassisVersion:"
devices:
- node: /dev/input/event13
evdev:
# Name: Primax Kensington Eagle Trackball
# ID: bus 0x3 vendor 0x47d product 0x2048 version 0x111
# Supported Events:
# Event type 0 (EV_SYN)
# Event type 1 (EV_KEY)
# Event code 272 (BTN_LEFT)
# Event code 273 (BTN_RIGHT)
# Event code 274 (BTN_MIDDLE)
# Event type 2 (EV_REL)
# Event code 0 (REL_X)
# Event code 1 (REL_Y)
# Event code 6 (REL_HWHEEL)
# Event code 8 (REL_WHEEL)
# Event type 3 (EV_ABS)
# Event code 40 (ABS_MISC)
# Value 0
# Min -128
# Max 127
# Fuzz 0
# Flat 0
# Resolution 0
# Event type 4 (EV_MSC)
# Event code 4 (MSC_SCAN)
# Properties:
name: "Primax Kensington Eagle Trackball"
id: [3, 1149, 8264, 273]
codes:
0: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] # EV_SYN
1: [272, 273, 274] # EV_KEY
2: [0, 1, 6, 8] # EV_REL
3: [40] # EV_ABS
4: [4] # EV_MSC
absinfo:
40: [-128, 127, 0, 0, 0]
properties: []
udev:
properties:
- ID_INPUT=1
- ID_INPUT_MOUSE=1
- ID_INPUT_TRACKBALL=1
- LIBINPUT_DEVICE_GROUP=3/47d/2048:usb-0000:00:14.0-3.1
- LIBINPUT_MODEL_LOGITECH_MARBLE_MOUSE=1
Failed to initialize the device quirks. Please see the above errors and/or re-run with --verbose for more details
and here are the button clicks, left:
- [ 20, 727847, 4, 4, 30] # EV_MSC / MSC_SCAN 30 (obfuscated)
- [ 20, 727847, 1, 272, 1] # EV_KEY / BTN_LEFT 1
- [ 20, 727847, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +6072ms
- evdev:
- [ 20, 807845, 4, 4, 30] # EV_MSC / MSC_SCAN 30 (obfuscated)
- [ 20, 807845, 1, 272, 0] # EV_KEY / BTN_LEFT 0
- [ 20, 807845, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +80ms
right:
- [ 0, 0, 4, 4, 30] # EV_MSC / MSC_SCAN 30 (obfuscated)
- [ 0, 0, 1, 273, 1] # EV_KEY / BTN_RIGHT 1
- [ 0, 0, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +0ms
- evdev:
- [ 0, 128015, 4, 4, 30] # EV_MSC / MSC_SCAN 30 (obfuscated)
- [ 0, 128015, 1, 273, 0] # EV_KEY / BTN_RIGHT 0
- [ 0, 128015, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +128ms
wheel anti-clockwise:
- [ 0, 0, 2, 8, 1] # EV_REL / REL_WHEEL 1
- [ 0, 0, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +0ms
- evdev:
- [ 0, 231995, 2, 8, 1] # EV_REL / REL_WHEEL 1
- [ 0, 231995, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +231ms
clockwise:
- [ 0, 0, 2, 8, -1] # EV_REL / REL_WHEEL -1
- [ 0, 0, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +0ms
- evdev:
- [ 2, 15992, 2, 8, -1] # EV_REL / REL_WHEEL -1
- [ 2, 15992, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +2015ms
The device is left-right symetrical. Centrally L-R but toward the back near the cable is the ball. This is surrounded by a ring which generates the scroll events. On each side of the ring are the left and right buttons. There are no other buttons or controls. Neither the ball, not the scroll ring can be pressed to act as another button.