-
Notifications
You must be signed in to change notification settings - Fork 181
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
Current implementation of Keystrokes/Macros is broken... #382
Comments
As being one of the ones who took this decision, I find this quite offensive.
glad to see some constructive comments at least :)
isn't that just a problem of macro semantic in libratbag/piper? We could perfectly emulate that behavior given that the definition of a macro is just a libratbag dbus API.
Why is that? We replace on the fly "simple" macros into key bindings, so if the hardware is capable of sending a media key only through a keybinding, you should transparently have that behavior
That's a bug in libratbag, keybindings should be represented as macros, and they should be transparently identified and used by the underlying ratbagd daemon.
We implemented that when we removed the keybindings capability. It was working, but now I can see that there is something wrong and the macros are not handled properly on Logitech devices, so that's a libratbag bug.
libratbag is capable of doing that by using
That is one thing we are lacking in the libratbag API. Can you open a bug on libratbag for it?
-> as shown above, this is just a ui problem for the first 2, and the last one we are probably missing a wait_for_button_release command, and then we would need the piper implementation. of course.
That is the question we always had in libratbag in general, how to make sure the UI is fully compatible with all the devices we have around. Currently
That is not a UI change, it's a libratbag/ratbagd change, and it seems there are at least 2 bugs:
|
Ahhhh so it's not only me? I set up one of my mouse buttons to act as a Gnome application list opener. On my keyboard its [RIGHT] SUPER + A. Piper sets the macro as When I click the specified button on my mouse I see that the "Activities" button in the top left of the gnome-shell top panel gets highlighted, but nothing else happens. If I hit the button again, it deselects the gnome-shell activities button. Nothing else happens. |
Sorry for very late response, but I've just stopped using piper and libratbag at all for a while and forgot about this. I understand that all the issues can be somehow fixed while maintaining macros and key binds connected together. But IMO this is not worth the trouble as it rises many more, hard to fix problems. Let's see that by example: Let's have some different mouse models:
Doesn't look like much, but... every single mouse in that approach we have to treat as a corner case and build perfect definition of what is supported in macros and what isn't. That's a lot of work and a lot of code to maintain. I know, we need it anyway to support macros, but if we keep those 2 things merged, we also need those corner cases to support simple key binds - feature that is much, much easier in general. Most of the users don't even care as macros, I personally never needed a macro on my mouse. Simple key binds are enough. So now, if we won't define macros support table for any mouse, we won't even deliver key binds functionality. Another problem I see is with mouse A in examples above. It can only support key binds. Now you have to force using single key press on button press action and single key release on button release action. If you don't define both, macro should be rejected as not supported. If you try to fix that for user, you will make inconsistent interface between this model and model that supports macros. I still also think that key binds should be separate as this is IMO basic functionality, where macros are more advanced and designed for people that really need them. Combining them together creates very hard user experience for people that don't need macros, without any improvement for people that do need one and without any improvement (only complications) in code simplicity and feature support. |
I have an issue with media keys. Volume up/down works when I set them in the Piper config. Nevertheless, nextsong, play/pause and previoussong don't work even if they're shown as configured when I do it. Once I close and reopen Piper, the key bindings for those are shown as "Unknown" ("Desconocido" in Spanish) instead of their corresponding actions. |
Then you're having more luck than me. I have the G8 and G7 buttons on my G502 Lightspeed set to volume using G HUB on Windows. Linux does not detect it however, even though the mouse is in on-board mode. My G502 Proteus Core, which is still supported by Logitech Gaming Software did not have this issue. I could set it using that to volume, put it in on-board mode and the volume would work out of the box in Linux. My workaround is to set the volume in Linux to a specific keyboard combo and then binding that to my Lightspeed. Not sure if I have to set the buttons back when on Windows though, haven't tried it yet. |
That doesn't seem right. If the device is actually in onboard mode and it works on Windows, it should work on Linux. Can you paste the output of |
I am using the same workaround for nextsong, play/pause and previoussong. In Windows, I use the Logitech Gaming Software (I've been using it since 2016) to configure my keys and they work flawlessly. My mouse is a G600. |
Is it on onboard memory mode? If it is we should be able to do the same in libratbag. |
Sure Output of
If I run @alejo9719 My first guess was to try Logitech Gaming Software to see if that solves it, but unfortunately the G502 Lightspeed only supports G-Hub. Because of the whole Coronavirus situation I'm back at home with my parents instead of my study apartment so I don't have access to my G502 Proteus Spectrum at the moment. |
Which kernel version are you running? There is a possibility that your device does not support those key codes. Even it being in onboard mode, the Windows drivers could be doing something in software due to the keys not being supported, please kill the Logitech software and see if they still work. |
By coincidence I just did a clean install of Ubuntu 20.04 on my machine. My current kernel is 5.4.0-26-generic. I will switch back to Windows right now to try turning off the software to see what it does and report back after. |
Update: I logged in to Windows, quit the G-Hub software, and the volume controls still worked. |
Did you make sure it was not running in background? |
Yes. I even checked all the processes in my Task Manager and closed the G-Hub updater service as well, and also all the processes from Logitech Options (I own an MX Master as well). Volume controlls still worked. I even tried on my brother's Windows machine, which doesn't even have any Logitech software installed. Volume still worked there. I also updated to the latest stable kernel; |
That is weird, can you install hid-tools (available via pip) and run |
I ran
|
What happens when you add the following to
Do the keys work? Note that libratbag/piper won't be able to access the device. |
Unfortunately no change. Also, piper can still access the device. I double checked my changes to |
What if you do In the end you should not see the module in |
Hmm this is weird. I've tried adding
|
In the meantime I've tried rebooting. |
I got it working now! I blacklisted |
Ah, right, I was thinking of hid-logitech-dj. You probably had to unload the module ( This is a kernel bug. |
Ah that explains it. Thanks for the help! |
Don't necessarily want to open a new issue for this question: Can the RETURN keystroke be bound to a button? Unfortunately trying to assign the keystroke macro just "Accepts" the configuration when RETURN is pressed - any ways around this? |
How does one go about recording a macro with custom timing for keypresses or combined keys (Ctrl+) and combination of both? |
Someone at some point did a big mistake by removing keystroke functionality, as you can allegedly achieve the same functionality through macros.
Well... this assumption is very far from being true and here are reasons why:
I know that those issues can be "fixed" somehow by introducing automatic switch between macro and keystroke in background, but more issues will pop up after those fixes. For example, I cannot see any reasonable way to distinguish between those actions, preserving macro-only UX:
Best interface to distinguish that is to separate macros from keystrokes.
Another example: to allow media keys to be set, you'll need to allow them in macros, detect that media key is used and switch to keystroke. And what if somebody will use media key in the middle of actual macro? You will prompt him that it is not allowed in this situation? How to explain that?
In my opinion, UI change to macro-only should be reverted immediately.
The text was updated successfully, but these errors were encountered: