Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S Solaar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pwr-Solaar
  • Solaar
  • Issues
  • #1071
Closed
Open
Issue created Feb 14, 2021 by Administrator@rootContributor

Take keyboard group into account in rule Key action

Created by: scottcove

Information

  • Solaar version (solaar --version and git describe --tags): solaar 1.0.4
  • Distribution: Ubuntu 20.04.2 LTS
  • Kernel version (ex. uname -srmo): Linux 5.8.0-43-generic x86_64 GNU/Linux
  • Output of solaar show for the target device (if applicable):
$ solaar show
Unifying Receiver
  Device path  : /dev/hidraw0
  USB id       : 046d:C52B
  Serial       : 20B7915A
    Firmware   : 24.11.B0036
    Bootloader : 02.09
    Other      : AA.AC
  Has 1 paired device(s) out of a maximum of 6.
  Notifications: wireless (0x000100)
  Device activity counters: 1=156

  1: M720 Triathlon Multi-Device Mouse
     Device path  : /dev/hidraw1
     WPID         : 405E
     Codename     : M720 Triathlon
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: 53FEE654
     Model ID:      B015405E0000
     Unit ID:       C8108484
        Bootloader: BOT 34.01.B0005
          Firmware: MPM 04.10.B0013
             Other: 
     The power switch is located on the base.
     Supports 36 HID++ 2.0 features:
         0: ROOT                   {0000}   
         1: FEATURE SET            {0001}   
         2: DEVICE FW VERSION      {0003}   
            Firmware: Bootloader BOT 34.01.B0005 000000A96719
            Firmware: Firmware MPM 04.10.B0013 405E00A96719
            Firmware: Other   
            Unit ID: C8108484  Model ID: B015405E0000  Transport IDs: {'btleid': 'B015', 'wpid': '405E'}
         3: DEVICE NAME            {0005}   
            Name: M720 Triathlon Multi-Device Mouse
            Kind: mouse
         4: WIRELESS DEVICE STATUS {1D4B}   
         5: RESET                  {0020}   
         6: CRYPTO ID              {0021}   
         7: DEVICE FRIENDLY NAME   {0007}   
         8: BATTERY STATUS         {1000}   
            Battery: 50%, discharging, next level 20%.
         9: CHANGE HOST            {1814}   
            Change Host: 2:ace-rimmer
        10: HOSTS INFO             {1815}   
            Host 0 (paired): SCOTT-LAPTOP
            Host 1 (paired): 
            Host 2 (paired): ace-rimmer.littlecoves
        11: REPROG CONTROLS V4     {1B04}   
            Key/Button Actions: {'80': 80, '81': 81, '82': 82, '83': 83, '86': 86, '91': 91, '93': 93, '208': 208}
            Key/Button Diversion: {'82': 0, '83': 1, '86': 1, '91': 1, '93': 1, '208': 1, '215': 1}
        12: PERSISTENT REMAPPABLE ACTION {1C00}   
        13: POINTER SPEED          {2205}   
            Pointer Speed: 1.0
            Sensitivity (Pointer Speed): 256
        14: VERTICAL SCROLLING     {2100}   
            Roller type: 3G
            Ratchet per turn: 24
            Scroll lines: 0
        15: DFUCONTROL UNSIGNED    {00C1}   
        16: DFUCONTROL SIGNED      {00C2}   
        17: DEVICE RESET           {1802}   internal, hidden
        18: unknown:1803           {1803}   internal, hidden
        19: CONFIG DEVICE PROPS    {1806}   internal, hidden
        20: OOBSTATE               {1805}   internal, hidden
        21: unknown:1813           {1813}   internal, hidden
        22: unknown:1830           {1830}   internal, hidden
        23: unknown:1861           {1861}   internal, hidden
        24: unknown:1890           {1890}   internal, hidden
        25: unknown:1891           {1891}   internal, hidden
        26: unknown:18A1           {18A1}   internal, hidden
        27: unknown:1DF3           {1DF3}   internal, hidden
        28: unknown:1E00           {1E00}   hidden
        29: unknown:1EB0           {1EB0}   internal, hidden
        30: unknown:18B1           {18B1}   internal, hidden
        31: unknown:1850           {1850}   internal, hidden
        32: unknown:1E22           {1E22}   
        33: unknown:1F03           {1F03}   internal, hidden
        34: unknown:18C0           {18C0}   internal, hidden
        35: HIRES WHEEL            {2121}   
            Multiplier: 8
            Has invert: Normal wheel motion
            Has ratchet switch: Normal wheel mode
            High resolution mode
            HID notification
            Scroll Wheel Direction: False
            Scroll Wheel Resolution: True
     Has 9 reprogrammable keys:
         0: Left Button               , default: Left Click                  => Left Click                
             mse, reprogrammable, pos:0, group:1, group mask:g1
             reporting: default
         1: Right Button              , default: Right Click                 => Right Click               
             mse, reprogrammable, 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, 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, pos:0, group:2, group mask:g1,g2
             reporting: diverted
         4: Forward Button            , default: Mouse Forward Button        => Mouse Forward Button      
             mse, reprogrammable, divertable, persistently divertable, raw XY, pos:0, group:2, group mask:g1,g2
             reporting: diverted
         5: Left Tilt                 , default: Mouse Scroll Left Button    => Mouse Scroll Left Button  
             mse, reprogrammable, divertable, persistently divertable, raw XY, pos:0, group:2, group mask:g1,g2
             reporting: diverted
         6: Right Tilt                , default: Mouse Scroll Right Button   => Mouse Scroll Right Button 
             mse, reprogrammable, divertable, persistently divertable, raw XY, pos:0, group:2, group mask:g1,g2
             reporting: diverted
         7: MultiPlatform Gesture Button, default: Multiplatform Gesture Button => Multiplatform Gesture Button
             mse, reprogrammable, divertable, persistently divertable, raw XY, pos:0, group:2, group mask:g1,g2
             reporting: diverted
         8: 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: diverted
     Battery: 50%, discharging, next level 20%.

Lightspeed Receiver
  Device path  : /dev/hidraw6
  USB id       : 046d:C53D
  Serial       : 330E2E8C
    Firmware   : 43.01.B0009
    Bootloader : 02.10
    Other      : AA.D2
  Has 1 paired device(s) out of a maximum of 1.
  Notifications: wireless, software present (0x000900)
  Device activity counters: (empty)

  1: G613 Wireless Mechanical Gaming Keyboard
     Device path  : None
     WPID         : 4065
     Codename     : G613
     Kind         : keyboard
     Protocol     : HID++ 4.2
     Polling rate : 1 ms (1000Hz)
     Serial number: 381EA9BC
     Model ID:      B34F40650000
     Unit ID:       6E4E8357
        Bootloader: BOT 46.00.B0006
          Firmware: MPK 05.02.B0021
             Other: 
     Supports 32 HID++ 2.0 features:
         0: ROOT                   {0000}   
         1: FEATURE SET            {0001}   
         2: DEVICE FW VERSION      {0003}   
            Firmware: Bootloader BOT 46.00.B0006 00006E86A7BD
            Firmware: Firmware MPK 05.02.B0021 40656E86A7BD
            Firmware: Other   
            Unit ID: 6E4E8357  Model ID: B34F40650000  Transport IDs: {'btleid': 'B34F', 'wpid': '4065'}
         3: DEVICE NAME            {0005}   
            Name: G613 Wireless Mechanical Gaming Keyboard
            Kind: keyboard
         4: WIRELESS DEVICE STATUS {1D4B}   
         5: RESET                  {0020}   
         6: DEVICE FRIENDLY NAME   {0007}   
         7: BATTERY STATUS         {1000}   
            Battery: 80%, discharging, next level 50%.
         8: CHANGE HOST            {1814}   
            Change Host: 1:ace-rimmer
         9: HOSTS INFO             {1815}   
            Host 0 (paired): 
            Host 1 (unpaired): 
        10: REPROG CONTROLS V4     {1B04}   
            Key/Button Diversion: {'209': 0, '210': 0}
        11: REPORT HID USAGE       {1BC0}   
        12: ENCRYPTION             {4100}   
        13: KEYBOARD DISABLE BY USAGE {4522}   
        14: KEYBOARD LAYOUT 2      {4540}   
        15: GKEY                   {8010}   
            Divert G Keys: True
        16: REPORT RATE            {8060}   
            Polling Rate (ms): 1
        17: DFUCONTROL SIGNED      {00C2}   
        18: DEVICE RESET           {1802}   internal, hidden
        19: unknown:1803           {1803}   internal, hidden
        20: CONFIG DEVICE PROPS    {1806}   internal, hidden
        21: unknown:1813           {1813}   internal, hidden
        22: OOBSTATE               {1805}   internal, hidden
        23: unknown:1830           {1830}   internal, hidden
        24: unknown:1890           {1890}   internal, hidden
        25: unknown:1891           {1891}   internal, hidden
        26: unknown:18A1           {18A1}   internal, hidden
        27: unknown:1DF3           {1DF3}   internal, hidden
        28: unknown:1E00           {1E00}   hidden
        29: unknown:1EB0           {1EB0}   internal, hidden
        30: unknown:1861           {1861}   internal, hidden
        31: unknown:18B1           {18B1}   internal, hidden
     Has 2 reprogrammable keys:
         0: Host Switch Channel 1     , default: HostSwitch Channel 1        => HostSwitch Channel 1      
             divertable, persistently divertable, pos:1, group:0, group mask:empty
             reporting: default
         1: Host Switch Channel 2     , default: HostSwitch Channel 2        => HostSwitch Channel 2      
             divertable, persistently divertable, pos:2, group:0, group mask:empty
             reporting: default
     Battery: 80%, discharging, next level 50%.

First of all, thanks for a wonderful app, that finally allows the use of the macro keys of the M720, and G613!

Is your feature request related to a problem? Please describe. I use a non-standard keyboard layout (Dvorak), and am finding that the UI is interpreting the keystrokes being input fine, but when the rules are being interpreted, they seem to be sending the keycode, rather than the keysym to the operating system, resulting in the key printed on the QWERTY layout being sent, and the incorrect macros being run.

A good example of this is Copy and Paste. I can set the following rules:

---
- Process: termius-app
- Rule:
  - Key: Left Tilt
  - KeyPress: [Control_L, Shift_L, C]
- Rule:
  - Key: Right Tilt
  - KeyPress: [Control_L, Shift_L, V]
...
---
- Rule:
  - Key: Left Tilt
  - KeyPress: [Control_L, C]
- Rule:
  - Key: Right Tilt
  - KeyPress: [Control_L, V]
...
---

This works fine if i'm using QWERTY, but if I'm in any other layouts the incorrect key is pushed. I'm guessing that this is because the keycode is being sent, rather than the keysym. In the examples above, V appears to be sent as keycode 55, rather than the keysym 0x76. This results in the incorrect key K (keysym 0x6b) being pushed, as it is mapped to keycode 55.

I have considered working around this by setting the correct physical keys in the rules, but this is further complicated by the fact that in my line of work I am often in customer VMs or in RDP (or team viewer) sessions that I cannot change the keyboard layout for, and adding exceptions to the rules could get very unwieldy very fast.

Describe the solution you'd like Instead of the keycode being sent, resulting in incorrect keypresses being sent, the rules should instead send the layout-agnostic keysym.

Describe alternatives you've considered An alternative here could be to detect the layout currently in use, and adapt to it, though this is complicated by the above-mentioned scenario whereby you are in an RDS session, or VM that the host reports the input method incorrectly because the guest is using a different layout that the host is unaware of.

Additional context If the keymaps are hardcoded into solaar, and you do need listings of the available keysyms, these can be found under the files /usr/include/X11/keysymdef.h (global), and /usr/include/X11/XF86keysym.h (vendor specific). The package x11proto-core-dev is required for these to be present on an Ubuntu machine.

Assignee
Assign to
Time tracking