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

Rule Editor Key to include only specific device selected #2067

Open
FormBurden opened this issue May 13, 2023 · 6 comments
Open

Rule Editor Key to include only specific device selected #2067

FormBurden opened this issue May 13, 2023 · 6 comments

Comments

@FormBurden
Copy link

Information

  • Solaar version: 1.1.9-9-gfb3675e
  • Distribution: Arch Linux
  • Kernel version: 6.3.1
  • Output of solaar show for the target device (if applicable):
Lightspeed Receiver
  Device path  : /dev/hidraw4
  USB id       : 046d:C539
  Serial       : 14459490
    Firmware   : 39.06
    Bootloader : 02.09
    Other      : AA.BE
  Has 1 paired device(s) out of a maximum of 1.
  Notifications: wireless, software present (0x000900)
  Device activity counters: (empty)

  1: G502 Gaming Mouse
     Device path  : /dev/hidraw9
     WPID         : 407F
     Codename     : G502
     Kind         : mouse
     Protocol     : HID++ 4.2
     Polling rate : 1 ms (1000Hz)
     Serial number: E89F15E0
     Model ID:      407FC08D0000
     Unit ID:       E89F15E0
        Bootloader: BOT 92.00.B0008
          Firmware: MPM 17.00.B0008
             Other: 
     The power switch is located on the base.
     Supports 30 HID++ 2.0 features:
         0: ROOT                   {0000} V0     
         1: FEATURE SET            {0001} V0     
         2: DEVICE FW VERSION      {0003} V2     
            Firmware: Bootloader BOT 92.00.B0008 AAEF21F1FA5F
            Firmware: Firmware MPM 17.00.B0008 407F21F1FA5F
            Firmware: Other   
            Unit ID: E89F15E0  Model ID: 407FC08D0000  Transport IDs: {'wpid': '407F', 'usbid': 'C08D'}
         3: DEVICE NAME            {0005} V0     
            Name: G502 LIGHTSPEED Wireless Gaming Mouse
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B} V0     
         5: CONFIG CHANGE          {0020} V0     
         6: BATTERY VOLTAGE        {1001} V2     
            Battery: 80% 4030mV , discharging.
         7: COLOR LED EFFECTS      {8070} V4     
         8: LED CONTROL            {1300} V0     
         9: ONBOARD PROFILES       {8100} V0     
            Device Mode: On-Board
            Onboard Profiles (saved): Enable
            Onboard Profiles        : Enable
        10: MOUSE BUTTON SPY       {8110} V0     
        11: REPORT RATE            {8060} V0     
            Polling Rate (ms): 1
            Polling Rate (ms) (saved): 1
            Polling Rate (ms)        : 1
        12: ADJUSTABLE DPI         {2201} V1     
            Sensitivity (DPI) (saved): 1600
            Sensitivity (DPI)        : 1600
        13: DEVICE RESET           {1802} V0    internal, hidden 
        14: unknown:1803           {1803} V0    internal, hidden 
        15: OOBSTATE               {1805} V0    internal, hidden 
        16: CONFIG DEVICE PROPS    {1806} V4    internal, hidden 
        17: unknown:1811           {1811} V0    internal, hidden 
        18: unknown:1830           {1830} V0    internal, hidden 
        19: unknown:1890           {1890} V4    internal, hidden 
        20: unknown:1891           {1891} V4    internal, hidden 
        21: unknown:18A1           {18A1} V0    internal, hidden 
        22: unknown:1801           {1801} V0    internal, hidden 
        23: unknown:18B1           {18B1} V0    internal, hidden 
        24: unknown:1DF3           {1DF3} V0    internal, hidden 
        25: unknown:1E00           {1E00} V0    hidden 
        26: unknown:1EB0           {1EB0} V0    internal, hidden 
        27: unknown:1863           {1863} V0    internal, hidden 
        28: unknown:1E22           {1E22} V0    internal, hidden 
        29: HIRES WHEEL            {2121} V0     
            Multiplier: 8
            Has invert: Normal wheel motion
            Has ratchet switch: Normal wheel mode
            High resolution mode
            HID notification
            Scroll Wheel Direction (saved): False
            Scroll Wheel Direction        : False
            Scroll Wheel Resolution (saved): True
            Scroll Wheel Resolution        : True
            Scroll Wheel Diversion (saved): False
            Scroll Wheel Diversion        : False
     Battery: 80% 4030mV , discharging.

This suggestion isn't really to a specific device, but I thought I would include the "Solaar Show" anyway for my device.

Is your feature request related to a problem? Please describe.
When trying to figure out what a "key" is called, you either do not know, have to look it up, or go down the incredibly long list of options when you type a letter or word. And yet, still don't know what most of them are, or do.

Describe the solution you'd like
Kind of a similar approach to when under "setting" on the Rule Editor where you can use a "specific" device, and when you pick said device, it will show all the buttons/gestures/etc., that the device can use (e.g Mouse button 4, 5, G1-G5+/etc).

And possibly the ability to just push the key on the device and it'll show what you pressed, such as G3, or mouse button 5, etc.

Hope this is possible with what is pulled and/or read from the device. The G915 keyboard I have has G1-5, but when searching for it, I get G1-30 or whatever. I don't need all that extra ones. Now I get it that you could end up owning other devices and it's great to see everything the Solaar Rule Editor can do, but if you own only a few devices, so much of that does not apply to your device.

Describe alternatives you've considered
Or, an option under the CLI (or the GUI) that shows what is being pressed, what the name of that button that is being pressed, etc. To figure out what the exact name is when searching for the "key" button.

@pfps
Copy link
Collaborator

pfps commented May 13, 2023

The rule editor allows all possible keys and buttons. This is by design, as there is no guarantee that the rule will run with the same devices active as when the rule is entered.

If you want to see the keys for a particular device you can use the main Solaar window. You have to use this window anyway as you also need to divert the key.

Adding an option that would restrict the possible keys and buttons to those on a selected device is possible, but is not going to be a high priority. Contributions to Solaar are always welcome. If you can figure out a good way of providing this feature and can implement it, your code can be incorporated into Solaar.

@FormBurden
Copy link
Author

Ah ok, no worries.

What exactly do you mean by you can see the keys in the main Solaar window? I'm looking at it, and yes I can edit some settings, but like for my mouse G502, I cannot see what keys would be for all the buttons, as on the mouse they are labeled G keys, and they go to G9. BUT, I can't even divert G keys for the mouse. Not sure if you can for other mouses, unless that is for Keyboards only or something.

Is there a way to figure out what a button is on a device? like a log or CLI command? Because like I said, my mouse has a total of 9 or so buttons, but I can't even figure out how they would be labeled for the Rule Editor.

@pfps
Copy link
Collaborator

pfps commented May 13, 2023

You can't determine how many G keys there are in the GUI. I think there is a call to get the number, but Solaar doesn't use it. To determine the regular keys that can be diverted look at the left-hand box in the Key/Button Diversion setting.

@pfps
Copy link
Collaborator

pfps commented May 13, 2023

Mice generally don't divert the G keys. They don't generally have G keys. To see if any G keys can be diverted look for a Divert G Keys diversion setting. If any G key can be diverted they all can.

@MattHag
Copy link
Contributor

MattHag commented Mar 2, 2024

This request seems to be mostly contained in my suggestions in #2267 and #2281. When both are well implemented, it shouldn't be necessary to tackle it on its own anymore. Most important for this is a rule editor, that's device dependent. The implementation already supports everything, only the UI needs adaption to make use of it.

@MattHag
Copy link
Contributor

MattHag commented Mar 9, 2024

The best implementation of this request is proposed in #2267 for which I just discovered, that the rule key will need to become keys in the UI. So there‘s one entry per rule which supports a combination of keypresses.

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

No branches or pull requests

3 participants