pwr-Solaar / Solaar

Linux device manager for Logitech devices
https://pwr-solaar.github.io/Solaar
GNU General Public License v2.0
5.54k stars 409 forks source link

Cannot remap DPI Switch to Super key #2561

Closed framctr closed 3 months ago

framctr commented 3 months ago

Information

Unifying Receiver Device path : /dev/hidraw0 USB id : 046d:C52B Serial : 139F9F48 C Pending : ff Firmware : 12.11.B0032 Bootloader : 04.16 Other : AA.AA Has 1 paired device(s) out of a maximum of 6. Notifications: wireless (0x000100) Device activity counters: 1=41

1: MX Vertical Wireless Mouse Device path : /dev/hidraw1 WPID : 407B Codename : MX Vertical Kind : mouse Protocol : HID++ 4.5 Report Rate : 8ms Serial number: 0580087F Model ID: B020407BC08A Unit ID: 540E0E6A 1: BOT 78.00.B0009 0: MPM 16.00.B0009 3: Supports 34 HID++ 2.0 features: 0: ROOT {0000} V0
1: FEATURE SET {0001} V0
2: DEVICE FW VERSION {0003} V2
Firmware: Bootloader BOT 78.00.B0009 AAE28E5B17FF Firmware: Firmware MPM 16.00.B0009 407B8E5B17FF Firmware: Other
Unit ID: 540E0E6A Model ID: B020407BC08A Transport IDs: {'btleid': 'B020', 'wpid': '407B', 'usbid': 'C08A'} 3: DEVICE NAME {0005} V0
Name: MX Vertical Advanced Ergonomic Mouse Kind: mouse 4: WIRELESS DEVICE STATUS {1D4B} V0
5: CONFIG CHANGE {0020} V0
Configuration: 11000000000000000000000000000000 6: CRYPTO ID {0021} V1
7: DEVICE FRIENDLY NAME {0007} V0
Friendly Name: MX Vertical 8: BATTERY STATUS {1000} V1
Battery: 90%, discharging, next level 50%. 9: unknown:1002 {1002} V0
10: REPROG CONTROLS V4 {1B04} V4
Azioni tasto/pulsante (saved): {Left Button:Left Click, Right Button:Right Click, Middle Button:Mouse Middle Button, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, DPI Switch:DPI Switch} Azioni tasto/pulsante : {Left Button:Left Click, Right Button:Right Click, Middle Button:Mouse Middle Button, Back Button:Mouse Back Button, Forward Button:Mouse Forward Button, DPI Switch:DPI Switch} Key/Button Diversion (saved): {?, Middle Button:Regular, Back Button:Regular, Forward Button:Regular, DPI Switch:Regular} Key/Button Diversion : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular, DPI Switch:Regular} 11: PERSISTENT REMAPPABLE ACTION {1C00} V0
Persistent Key/Button Mapping : {unknown:0000:No Output (only as default), Left Button:Mouse Button Left, Right Button:Mouse Button Right, Middle Button:Mouse Button Middle, Back Button:Mouse Button Back, Forward Button:Mouse Button Forward} 12: CHANGE HOST {1814} V1
Cambia Host : 1:NFCULTRER206470 13: HOSTS INFO {1815} V1
Host 0 (unpaired): NFCULTRER206470 Host 1 (unpaired): NFCULTRER206470 Host 2 (unpaired): 14: XY STATS {2250} V0
15: unknown:18B1 {18B1} V0 internal, hidden 16: VERTICAL SCROLLING {2100} V0
Roller type: standard Ratchet per turn: 24 Scroll lines: 0 17: LOWRES WHEEL {2130} V0
Wheel Reports: HID Scroll Wheel Diversion (saved): False Scroll Wheel Diversion : False 18: ADJUSTABLE DPI {2201} V1
Sensibilità (DPI) (saved): 1600 Sensibilità (DPI) : 1000 19: DEVICE RESET {1802} V0 internal, hidden 20: unknown:1803 {1803} V0 internal, hidden 21: CONFIG DEVICE PROPS {1806} V5 internal, hidden 22: unknown:1813 {1813} V0 internal, hidden 23: OOBSTATE {1805} V0 internal, hidden 24: unknown:1830 {1830} V0 internal, hidden 25: unknown:1890 {1890} V2 internal, hidden 26: unknown:1891 {1891} V2 internal, hidden 27: unknown:18A1 {18A1} V0 internal, hidden 28: unknown:1DF3 {1DF3} V0 internal, hidden 29: unknown:1E00 {1E00} V0 hidden 30: unknown:1EB0 {1EB0} V0 internal, hidden 31: unknown:1E22 {1E22} V0 internal, hidden 32: unknown:1861 {1861} V0 internal, hidden 33: unknown:18C0 {18C0} V0 internal, hidden Has 7 reprogrammable keys: 0: Left Button , default: Left Click => Left Click
mse, reprogrammable, analytics key events, pos:0, group:1, group mask:g1 reporting: default 1: Right Button , default: Right Click => Right Click
mse, reprogrammable, analytics key events, pos:0, group:1, group mask:g1 reporting: default 2: Middle Button , default: Mouse Middle Button => Mouse Middle Button
mse, reprogrammable, divertable, persistently divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2 reporting: default 3: Back Button , default: Mouse Back Button => Mouse Back Button
mse, reprogrammable, divertable, persistently divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2 reporting: default 4: Forward Button , default: Mouse Forward Button => Mouse Forward Button
mse, reprogrammable, divertable, persistently divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2 reporting: default 5: DPI Switch , default: DPI Switch => DPI Switch
mse, reprogrammable, divertable, persistently divertable, raw XY, analytics key events, pos:0, group:2, group mask:g1,g2 reporting: default 6: Virtual Gesture Button , default: Virtual Gesture Button => Virtual Gesture Button
divertable, virtual, raw XY, force raw XY, pos:0, group:3, group mask:empty reporting: default Has 6 persistent remappable keys: 0: Left Button => Mouse Button: Mouse Button Left 1: Right Button => Mouse Button: Mouse Button Right 2: Middle Button => Mouse Button: Mouse Button Middle 3: Back Button => Mouse Button: Mouse Button Back 4: Forward Button => Mouse Button: Mouse Button Forward 5: unknown:0000 => None Battery: 90%, discharging, next level 50%.


- Contents of `~/.config/solaar/config.yaml` (or `~/.config/solaar/config.json` if `~/.config/solaar/config.yaml` not present):

Describe the bug I cannot remap the DPI Switch key of my Logitech MX Vertical to the Super (aka Win) key.

I set up the rule as described in the guide, putting https://raw.githubusercontent.com/pwr-Solaar/Solaar/master/rules.d-uinput/42-logitech-unify-permissions.rules in /etc/udev/rules.d and rebooting the system.

However, it does seems that it does not work...

To Reproduce Steps to reproduce the behavior:

  1. Install Solaar
  2. Connect the mouse
  3. Set the following rule:
    User-defined rules
    Rule
    Key:      DPI Switch (00FD) (released)
    Key Press:  Super_L (release)
  4. Set the udev rule
  5. reboot
  6. Mouse key remap does not work
pfps commented 3 months ago

As stated in the Solaar documentation you have to divert the key for Solaar rules to trigger on it. See https://pwr-solaar.github.io/Solaar/rules/ for more information.

framctr commented 3 months ago

Thanks @pfps I missed that point.

To recap to enable the top button (DPI Switch) to trigger the Super (aka Win) key:

  1. Set the DPI Switch button to Diverted instead of Regular
  2. Create the rule:
    User-defined rules
    Rule
    Key:      DPI Switch (00FD) (released)
    Key Press:  Super_L (click)
  3. Put the file available at https://raw.githubusercontent.com/pwr-Solaar/Solaar/master/rules.d-uinput/42-logitech-unify-permissions.rules in /etc/udev/rules.d
  4. reboot