TL;DR use evrouter
I recently decided to try to get some of the extra buttons on my mouse to do various darkmod actions in linux (Fedora 28). Darkmod does not notice them when you try to make a shortcut within the game.
I initially tried xbindkeys and xautomation (xte). This worked in the terminal but not in fullscreen (presumadly, xbindkeys needs a window focus), so I tried evrouter which does work.
1. add your userid to the "input" group to read the appropriate event device files in /dev/input/by-id/*
# gpasswd -a userid input
In my case I needed these two device files to notice all buttons:
2. use evrouter to show you the button press/event it sees when you press your mouse button:
$ evrouter --dump /dev/input/by-id/*
there will be a line that says "fill this in". place this line in ~/.evrouterrc and replace the "fill this in" with the appropriate key syntax... I have "g" mapped to zoom scope so that is "XKey/g".
"Logitech G300s Optical Gaming Mouse" "/dev/input/by-id/usb-Logitech_G300s_Optical_Gaming_Mouse-event-mouse" none key/275 "XKey/g"
add any other buttons/events as wanted to .evrouterrc
3. run evrouter on the appropriate dev files.
$ evrouter /dev/input/by-id/usb-Logitech_G300s_Optical_Gaming_Mouse-event-mouse /dev/input/by-id/usb-Logitech_G300s_Optical_Gaming_Mouse-if01-event-kbd
4. play darkmod with extra button support
Edited by Sneaker, 06 September 2018 - 06:15 PM.