You are not logged in.
Hello,
xinput --list --short gives:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Razer Razer Ouroboros Gaming Dock id=8 [slave pointer (2)]
⎜ ↳ Razer Razer Ouroboros Gaming Dock id=9 [slave pointer (2)]
⎜ ↳ Logitech Gaming Mouse G400 id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Razer Razer Ouroboros Gaming Dock id=10 [slave keyboard (3)]
↳ USB Keyboard id=12 [slave keyboard (3)]
↳ USB Keyboard id=13 [slave keyboard (3)]
↳ Dell WMI hotkeys id=14 [slave keyboard (3)]
There are three things called "Razer Razer Ouroboros Gaming Dock", but this is actually just a mouse. Because this mouse somehow manages to appear three times (maybe because it's wireless) with the exact same name, I cannot refer to it by name with xinput:
$xinput --list-props "pointer:Razer Razer Ouroboros Gaming Dock"
Warning: There are multiple devices matching 'pointer:Razer Razer Ouroboros Gaming Dock'.
To ensure the correct one is selected, please use the device ID, or prefix the
device name with 'pointer:' or 'keyboard:' as appropriate.
unable to find device pointer:Razer Razer Ouroboros Gaming Dock
However, it's possible to disable buttons of it by using its id instead, here "8" (the first number below):
xinput set-button-map 8 1 2 3 4 5 0 0 0 0 0
However, this id number changes after reboot. For example on a previous boot the id I needed was "12" instead of "8". Back then, I did:
xinput set-button-map 12 1 2 3 4 5 0 0 0 0 0
However, it turns out this button-map is not permanent! After reboot, the side-buttons I want to disable, are operational again.
So I would like to put this in .xsessionrc. But if the id number changes every time, I cannot do that!!
Is there a more permanent way to refer to a device with xinput?
Thanks.
Last edited by aardwolf (2014-09-24 11:19:59)
Offline
Something like this should do the trick:
/etc/X11/xorg.conf.d/20-razer.conf
Section "InputClass"
Identifier "razer mouse"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
MatchProduct "Razer Ouroboros Gaming Dock"
Driver "evdev"
Option "ButtonMapping" "1 2 3 4 5 0 0 0 0 0"
EndSectionOffline