Sidewinderd

This is a quick-and-dirty way to make the macro keys on the Logitech G105 keyboard usable on an OpenRC Gentoo system. Perhaps it can be used on a systemd box as well. Please feel free to improve, it should be possible to turn all this into a well-behaved ebuild.

Attach your Logitech G105 keyboard to your Gentoo box. You should see a filesystem object such as this one:

/dev/input/by-id/usb-Logitech_Gaming_Keyboard_G105-event-kbd

If not present, try rebooting. If that does not help then maybe the kernel needs to be reconfigured (TBD: how?).

Become root and create a source directory somewhere:

mkdir -p /opt/local/src/sidewinder cd /opt/local/src/sidewinder

Download and unpack the "sidewinderd" software from GitHub:

wget https://github.com/tolga9009/sidewinderd/archive/master.zip unzip master.zip cd sidewinderd-master

The following edit seems to be necessary:

sed -i -e s:/dev/input/uinput:/dev/input/by-id/usb-Logitech_Gaming_Keyboard_G105-event-kbd: src/core/virtual_input.cpp

Build and install (warning: this is a dirty step since Portage tools are not being used):

mkdir build cd build cmake .. make mkdir -p /usr/local/lib/systemd/system make install

Edit the configuration file (replace MYUSERNAME with your login name)

sed -i -e '/user = /s:root:MYUSERNAME:' /etc/sidewinderd.conf

Start the daemon:

/usr/local/bin/sidewinderd

If all went well you should now be able to use the MR, M1, M2, M3 and G1 through G6 keys. To record a macro for G1 press MR, G1, any key sequence, and MR again. Three separate sets of definitions can be switched between using the M1, M2, M3 keys.

Uninstalling can be done manually by removing /usr/local/bin/sidewinderd, /etc/sidewinderd.conf and /usr/local/lib/systemd/system/sidewinderd.service.