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 /d