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
  • #1482
Closed
Open
Issue created Mar 09, 2022 by Administrator@rootContributor

Help: How do I create rules for the M keys?

Created by: Hubro

I have enabled "Divert G-keys" and launched Solaar with -dd. When I press my M1, M2, M3 and MR keys, respectively, I see this output in the terminal:

10:34:01,784    DEBUG [ReceiverListener:hidraw17] logitech_receiver.base: (23) => r[11 01 1200 01000000000000000000000000000000]
10:34:01,784    DEBUG [ReceiverListener:hidraw17] logitech_receiver.notifications: : notification for feature MKEYS, report 1, data 01000000000000000000000000000000
10:34:01,965    DEBUG [ReceiverListener:hidraw17] logitech_receiver.base: (23) => r[11 01 1200 00000000000000000000000000000000]
10:34:01,965    DEBUG [ReceiverListener:hidraw17] logitech_receiver.notifications: : notification for feature MKEYS, report 1, data 00000000000000000000000000000000
10:34:03,438    DEBUG [ReceiverListener:hidraw17] logitech_receiver.base: (23) => r[11 01 1200 02000000000000000000000000000000]
10:34:03,438    DEBUG [ReceiverListener:hidraw17] logitech_receiver.notifications: : notification for feature MKEYS, report 1, data 02000000000000000000000000000000
10:34:03,593    DEBUG [ReceiverListener:hidraw17] logitech_receiver.base: (23) => r[11 01 1200 00000000000000000000000000000000]
10:34:03,593    DEBUG [ReceiverListener:hidraw17] logitech_receiver.notifications: : notification for feature MKEYS, report 1, data 00000000000000000000000000000000
10:34:04,141    DEBUG [ReceiverListener:hidraw17] logitech_receiver.base: (23) => r[11 01 1200 04000000000000000000000000000000]
10:34:04,141    DEBUG [ReceiverListener:hidraw17] logitech_receiver.notifications: : notification for feature MKEYS, report 1, data 04000000000000000000000000000000
10:34:04,239    DEBUG [ReceiverListener:hidraw17] logitech_receiver.base: (23) => r[11 01 1200 00000000000000000000000000000000]
10:34:04,239    DEBUG [ReceiverListener:hidraw17] logitech_receiver.notifications: : notification for feature MKEYS, report 1, data 00000000000000000000000000000000
10:34:05,172    DEBUG [ReceiverListener:hidraw17] logitech_receiver.base: (23) => r[11 01 1300 01000000000000000000000000000000]
10:34:05,172    DEBUG [ReceiverListener:hidraw17] logitech_receiver.notifications: : notification for feature MR, report 1, data 01000000000000000000000000000000
10:34:05,310    DEBUG [ReceiverListener:hidraw17] logitech_receiver.base: (23) => r[11 01 1300 00000000000000000000000000000000]
10:34:05,310    DEBUG [ReceiverListener:hidraw17] logitech_receiver.notifications: : notification for feature MR, report 1, data 00000000000000000000000000000000

There are 6 notifications in total, the first being the key-down for M1, the second being the key-up for M1, the third being key-down for M2 and so on.

So it seems like all the information is here, I just need to know how to write the rule.

Reading the docs, it seems like I need to write a "Test" condition for this, but unfortunately the documentation for that is brief and had no examples:

Test conditions consisting of a sequence of three or four integers use the first two to select bytes of the notification data. Writing this kind of test condition is not trivial. Three-element test conditions are true if the selected bytes bit-wise anded with its third element is non-zero. The value of these test conditions is the result of the and. Four-element test conditions are true if the selected bytes form a signed integer between the third and fourth elements. The value of these test condition is the signed value of the selected bytes if that is non-zero otherwise True.

After reading this, I barely have any more of a clue how to write this rule than I did before reading it. I need to write a sequence of 3 or 4 integers. Are they comma separated? Space separated? Are they formatted as decimal numbers? Binary numbers? No matter what I write in this box I get the error "Test string argument not name of a test". The first 2 numbers selects the bytes from the notification. How exactly? These docs are sorely missing a couple of examples to clarify these questions.

So I'm guessing I need to write an "And" rule like this:

  • And
    • Feature: MKEYS(8020)
    • Test: <first byte> <first byte> 01/02/04

But how do I write the test?

Assignee
Assign to
Time tracking