Closed 5uie closed 2 years ago
To make keys or buttons initiate Solaar rule processing they have to be diverted.
The Solaar documentation discusses this in the rules document:
Solaar's rules only trigger on HID++ notifications so device actions that
normally produce HID output have to be first be set (diverted) to
produce HID++ notifications instead of their normal behavior.
Currently Solaar can divert some mouse scroll wheels, some
mouse thumb wheels, the crown of Craft keyboards, and some keys and buttons.
If the scroll wheel, thumb wheel, crown, key, or button is
not diverted by setting the appropriate setting then no HID++ notification is
generated and rules will not be triggered by manipulating the wheel, crown, key, or button.
Look for HID++
or Diversion
settings to see what
diversion can be done with your devices.
PR #1706 shows a short description for the rule component being edited. See Issue #1701 for more information. Try running PR #1706 and see whether the description for the Key component would have helped you. If not, please suggest wording that might have helped you.
To make keys or buttons initiate Solaar rule processing they have to be diverted.
The Solaar documentation discusses this in the rules document:
Solaar's rules only trigger on HID++ notifications so device actions that normally produce HID output have to be first be set (diverted) to produce HID++ notifications instead of their normal behavior. Currently Solaar can divert some mouse scroll wheels, some mouse thumb wheels, the crown of Craft keyboards, and some keys and buttons. If the scroll wheel, thumb wheel, crown, key, or button is not diverted by setting the appropriate setting then no HID++ notification is generated and rules will not be triggered by manipulating the wheel, crown, key, or button. Look for
HID++
orDiversion
settings to see what diversion can be done with your devices.
Apologies if I am refering to the wrong page or have misunderstood! I have seen the instructions at https://pwr-solaar.github.io/Solaar/capabilities and at https://pwr-solaar.github.io/Solaar/rules. Based on the information at https://pwr-solaar.github.io/Solaar/features.html, I looked at the file in lib/logitech_receiver/settings_templates.py and lib/logitech_receiver/hidpp20.py and it seems to suggest that the back and forward button aren't part of the files for my PR (#1445 or in #1706 as mentioned in the response).
hidpp-list-devices
/dev/hidraw0: Logitech USB Receiver (046d:c52b) HID++ 1.0
/dev/hidraw0 (device 1): ERGO M575 (046d:4096) HID++ 4.5
hidpp-list-features /dev/hidraw0
Logitech USB Receiver (046d:c52b) is a HID++ 1.0 device
Register 0x00 read 3: 00 09 00
Register 0x01 read 3: 00 00 00
Register 0x02 read 3: 00 01 00
Register 0x03 read 3: 00 00 00
Register 0xb3 read 16: 7c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Register 0xb5 read 16: Invalid value (0x03)
Register 0xd0 read 3: 00 00 00
Register 0xd4 read 3: 00 00 7c
Register 0xe6 read 3: 00 00 00
Register 0xf0 read 3: 00 00 00
Register 0xf1 read 3: Invalid value (0x03)
xev | grep button
state 0x0, button 9, same_screen YES
state 0x0, button 9, same_screen YES
state 0x0, button 8, same_screen YES
state 0x0, button 8, same_screen YES
I have #1701 on my machine now,
> git describe --tags
1.1.4-42-g29d2c14
The instructions read fine for me.
However, the issue persists. Am I supposed to use a feature such as REPROG CONTROLS or MKEYS before I trigger the key and the action?
Once again apologies if I haven't understood and thank you for providing Solaaris!
To have the back and forward buttons trigger Solaar rules you have to first use Solaar to "divert" the buttons so that they produce messages that Solaar can use. You do this in the Solaar GUI by using the Key/Button Diversion setting and set the Back Button and Forward Button to Diverted. You also have to have to Solaar GUI running.
Only when Solaar is running and only when keys or buttons are diverted will Solaar rules be run in response to pressing the key or button.
Is this correct? I have the GUI running (have restarted Solaaris too) but it still doesn't acknowledge this.
What you did was add an extra condition to the rule. This rule acts as follows:
When a device sends a message to Solaar, if your ERGO has its back button diverted and the back button was the cause of the message then simulate an Alt_L + Tab.
The previous rules were fine. The first one read as follows:
When a device sends a message to Solaar, if the back button was the cause of the message then simulate an Alt_L + Tab.
What was missing was that your mouse never sent this kind of message because the back and forward buttons were not diverted and thus they never caused messages to be sent to Solaar. Solaar rules do not respond to normal input messages from devices, just the special kinds of message that arise from diversions.
You need to use the normal main window in Solaar and in the Key/Button Diversion setting change Back Button and Forward Button to Diverted.
https://pwr-solaar.github.io/Solaar/Solaar-main-window-back-divert.png shows the main Solaar window with the Back Button diverted. Your main window will not look exactly like this, of course, because your device is different.
https://pwr-solaar.github.io/Solaar/Solaar-main-window-back-divert.png shows the main Solaar window with the Back Button diverted. Your main window will not look exactly like this, of course, because your device is different.
Thank you this worked, but how do I setup a similar divert for the forward button? As GUI on the main screen seems to allow only for one button to be diverted
Each key or button has its own value. Just change the first field to Forward Button and change that to Diverted.
Thank you that worked, I thought we needed another GUI entry to do this.
Information
solaar --version
orgit describe --tags
if cloned from this repository): Solaar version: solaar 1.1.1 git tags: 1.1.1-83-g4bc298auname -srmo
):KERNEL VERSION HERE
Linux 5.19.2 x86_64 GNU/Linuxsolaar show
:~/.config/solaar/config.yaml
:~/.config/solaar/rules.yaml
:Describe the bug