Skip to content

Instantly share code, notes, and snippets.

@cornernote
Last active January 15, 2022 17:18
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cornernote/81affe26bdb15b7c49f4cceaae2f703f to your computer and use it in GitHub Desktop.
Save cornernote/81affe26bdb15b7c49f4cceaae2f703f to your computer and use it in GitHub Desktop.
Logitech G105 Keyboard - Ubuntu 18.04

Logitech G105 Keyboard - Ubuntu 18.04

Sidewinderd: https://github.com/tolga9009/sidewinderd

Setup

Download:

sudo apt install libconfig++-dev libtinyxml2-dev libudev-dev
git clone https://github.com/tolga9009/sidewinderd.git

Build:

mkdir build
cd build
cmake ..
make
sudo make install

Config /etc/sidewinderd.conf:

user = "cornernote";
capture_delays = false;

Start:

sudo systemctl enable sidewinderd.service
sudo systemctl start sidewinderd.service

Record macros

The macro keys are fully programmable, but there is no default event. You can add functions to them, by recording macros or key combinations:

  • Choose a profile. The profile LED on the device will show you, which profile is active.
  • Press record key. The record LED will light up.
  • Now, choose and press a macro key. On some devices, the record LED will begin to blink. You're now in macro mode. Please note, that existing macros may get overwritten.
  • Everything you type on the keyboard will get recorded. You can either record a single key combination or a long series of keypresses. Please note, that keypresses still send events to your operating system and your programs.
  • When done, press the record key again. This will stop recording and save the macro.
  • You've now created a macro. Use it by setting the chosen profile and pressing the chosen macro key.

Edit Macros

The XML files can be edited by hand, for example if you wish to change or remove the recorded delays.

sudo nano /root/.local/share/sidewinderd/profile_1/s1.xml (button M1/G1)
@reincornator
Copy link

reincornator commented May 3, 2020

Thanks! Tell me how to activate it "INSTANT MEDIA ACCESS" (this is red buttons under F6-F12) without pressing the "FN"button.

@razibus
Copy link

razibus commented May 11, 2020

Hello,
Thank you for your contribution !

I got this error recorded in dmesg:

sidewinderd[2033]: segfault at 14 ip 0000558ccd78e181 sp 00007ffd04e60320 error 4 in sidewinderd[558ccd78c000+e000]
Code: ff ff 48 8b 45 f8 48 83 c0 28 48 89 c7 e8 37 e8 ff ff 48 89 c7 e8 df e9 ff ff 48 8b 55 f8 48 89 42 68 48 8b 45 f8 48 8b 40 68 <8b> 40 14 89 c7 e8 c5 eb ff ff 48 8b 45 f8 48 8b 40 68 8b 40 10 89

I solved it by keeping root as the configured user in /etc/sidewinderd.conf and by creating the folder tree inside the root user folder :

sudo mkdir -p /root/.local/share/sidewinderd/profile_1
sudo mkdir -p /root/.local/share/sidewinderd/profile_2
sudo mkdir -p /root/.local/share/sidewinderd/profile_3

Now everything works properly on Ubuntu 2004. I would recommend to share your work with the Ubuntu community to add it to the Ubuntu distribution.
Regards

@cornernote
Copy link
Author

@reincornator

Thanks! Tell me how to activate it "INSTANT MEDIA ACCESS" (this is red buttons under F6-F12) without pressing the "FN"button.

I think you are referring to a different keyboard. The G105 does not have a FN key.

@razibus
Copy link

razibus commented May 12, 2020

@reincornator

Thanks! Tell me how to activate it "INSTANT MEDIA ACCESS" (this is red buttons under F6-F12) without pressing the "FN"button.

I think you are referring to a different keyboard. The G105 does not have a FN key.

Hello,
I have a french G105 keyboard. It has a FN key on the right of the AltGr key, next to the space bar. The red buttons respond under the FN key pression, I have no clue haw to invert the default behaviour (direct access to red keys & indirect access to function keys).
It also has a contextual menu key which does not work with the current configuration.
This is the actual disposition of the lower key lane of my keyboard, from left to right :
Ctrl - Windows Key - Alt - Space Bar - AltGr - FN - Context Menu Key - Ctrl

@0815fips
Copy link

You are a hero!

I successfully made my first macro with my G105 on Ubuntu 20.04.
Another approach to explain the functionality with keys for the more visual guys (taken from the gentoo instructions: https://wiki.gentoo.org/wiki/Sidewinderd#Logitech_G105)

If sidewinderd started successfully, the [MR], [M1], [M2], [M3] and [G1] through [G6] keys should now be usable. Three sets of macro profiles can be switched between using the [M1], [M2] and [M3] keys. Recorded macros are stored in their respective profile directories e.g.~/.local/share/sidewinderd/profile_{1,2,3}

To record a macro for the [G1] key in the [M1] profile, press [M1], [MR], [G1], the desired key sequence, and [MR] again. To playback the recorded macro, press the [G1] key.

@cornernote
Copy link
Author

@0815fips, glad it helped! I moved on to a G815 with RGB LED keys. I still use sidewinderd, but I also needed G815-led. I still have my G105 too, and still love it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment