Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More example configurations? #5

Open
ancoron opened this issue Dec 30, 2023 · 4 comments
Open

More example configurations? #5

ancoron opened this issue Dec 30, 2023 · 4 comments

Comments

@ancoron
Copy link

ancoron commented Dec 30, 2023

Hi,

just an attempt to get some more details on how specifically to configure things as I have a Logitech G510 (and a G15 somewhere).

It would be really great if someone could share a full example configuration to make use of the G-, LCD and macro keys as I have trouble finding out which codes are coming in.

More specifically, I've read elsewhere that @Lurgainn seems to have been in contact with you and had success in configuring it.

Also, for some early confirmation: am I correct to assume that the dev_name can be a device name as it appears in /sys/class/input/.../name?

@sebastiansam55
Copy link
Owner

sebastiansam55 commented Dec 30, 2023

thanks for your interest in the project

run evtest, you may have to install it, it will show a list of the input devices.

You have to do trial and error, fancy keyboards (I have an ergodox with QMK) add multiple devices for a variety of reasons, like there is often one for mouse input and one for keyboard input and sometimes an additional one for specialty keys like the G- ones or media play/pause keys.
Screenshot 2023-12-30 074022

Once you find the correct device you can use evtest to get the correct keycodes (the code 2 (KEY_1) means that they keycode for the 1 key is 2);
Screenshot 2023-12-30 074348

dev_name is the name of the device as it appears in evtest output, I'm not sure if that is the same as the path you provided. I believe it would also work with event0 but you should try to use the name as those numbers can change on reboot to my understanding.

I will eventually correct the default behavior but please be aware that by default you'll not be getting any console output, it's getting piped to a log file. Even errors or failures!

The log file should be at ~/.local/state/uinput-macropad

@ancoron
Copy link
Author

ancoron commented Dec 30, 2023

@sebastiansam55 Thx for the quick response.

FTR, after testing the Logitech G510, here is a full device / key mapping for device Logitech Gaming Keyboard Gaming Keys:

System: Arch Linux
Kernel: 6.6.8
Keyboard:

  • model: logitech_g15
  • layout: de
  • nodeadkeys
Key Code Default event Notes
M1 691
M2 692
M3 693
MR 688
mute headphones 113 KEY_MUTE mapped to system audio mute by default - if headphones plugged in, key is not available
mute microphone 190 KEY_F20 mapped to system mic mute by default - if headphones plugged in, key is not available
LCD program switch 696
LCD key 1 697
LCD key 2 698
LCD key 3 699
LCD key 4 700
G1 656
G2 657
G3 658
G4 659
G5 660
G6 661
G7 662
G8 663
G9 664
G10 665
G11 666
G12 667
G13 668
G14 669
G15 670
G16 671
G17 672
G18 673

I'll add a full config template when I've set it up without any issues.

@ancoron
Copy link
Author

ancoron commented Jan 3, 2024

@sebastiansam55 I've made some adjustments and extensions on a fork, namely:

  1. expand user home on any command argument in any place and also resolve environment variables (supports $HOME)
  2. support layer-independent default macros (so that you don't need to duplicate them in each layer)
  3. support named custom keys, so one can use "G13" or "M2" as a key for macros instead of remembering the codes

I also added a simple configuration example:

Then, I've added a tool (and some docs for it) to disable the G key handling on the standard keyboard device:

Let me know if you want to have any of it to be part of your official project repo.

@sebastiansam55
Copy link
Owner

(a bit delayed I know) If you want to open a PR I'll set aside some time to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants