quirks: ignore mode switch button on Madcatz R.A.T.3 mouse

Avoid stuck buttons, so window managers won't behave buggy, for example:
* You click on one window, but click is emulated in another one
* You hover cursor over button/link but see no feedback
Based on quirk for Cyborg mouse.

Signed-off-by: Anatolii Lishchynskyi <iamnotacake@protonmail.com>
This commit is contained in:
Anatolii Lishchynskyi 2019-12-11 09:45:49 +00:00 committed by Peter Hutterer
parent 6c55880a7d
commit 970b5aff59
2 changed files with 25 additions and 0 deletions

View file

@ -318,6 +318,7 @@ quirks_data = [
'quirks/30-vendor-ibm.quirks',
'quirks/30-vendor-kensington.quirks',
'quirks/30-vendor-logitech.quirks',
'quirks/30-vendor-madcatz.quirks',
'quirks/30-vendor-microsoft.quirks',
'quirks/30-vendor-razer.quirks',
'quirks/30-vendor-synaptics.quirks',

View file

@ -0,0 +1,24 @@
# Do not edit this file, it will be overwritten on update
# The Madcatz RAT3 has a mode button that cycles through event codes.
# On press, we get a release for the current mode and a press for the
# next mode:
# -event21 DEVICE_ADDED Madcatz Mad Catz R.A.T.3 Mouse seat0 default group1 cap:p left scroll-nat scroll-button
# event21 POINTER_BUTTON +2.35s BTN_BACK (278) pressed, seat count: 1
# event21 POINTER_BUTTON +3.08s BTN_BACK (278) released, seat count: 0
# event21 POINTER_BUTTON +3.08s BTN_TASK (279) pressed, seat count: 1
# event21 POINTER_BUTTON +6.69s BTN_FORWARD (277) pressed, seat count: 1
# event21 POINTER_BUTTON +6.69s BTN_TASK (279) released, seat count: 0
# event21 POINTER_BUTTON +7.32s BTN_FORWARD (277) released, seat count: 0
# event21 POINTER_BUTTON +7.32s BTN_BACK (278) pressed, seat count: 1
# event21 POINTER_BUTTON +7.84s BTN_BACK (278) released, seat count: 0
# event21 POINTER_BUTTON +7.84s BTN_TASK (279) pressed, seat count: 1
#
# Disable the event codes to avoid stuck buttons.
[Madcatz RAT3]
MatchUdevType=mouse
MatchBus=usb
MatchVendor=0x0738
MatchProduct=0x1703
# EV_KEY 0x115, 0x116, 0x117
AttrEventCodeDisable=EV_KEY:0x115;EV_KEY:0x116;EV_KEY:0x117