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
  • Wiki
  • Example: Diverted "Smart Shift" button for common devices

Example: Diverted "Smart Shift" button for common devices · Changes

Page history
Added a slight generalization authored Sep 10, 2022 by John Erling Blad's avatar John Erling Blad
Hide whitespace changes
Inline Side-by-side
Example:-Diverted-"Smart-Shift"-button-for-common-devices.md
View page @ 66dc5ddf
...@@ -82,6 +82,48 @@ In the GUI go to “Key/Button Diversion” for the mouse, and change “Smart S ...@@ -82,6 +82,48 @@ In the GUI go to “Key/Button Diversion” for the mouse, and change “Smart S
It should not be necessary to edit the rules with the Rule editor, but the rules could instead be created in the GUI. If the rules are not created in the Rule editor, they are not if you edit the file, then you should now restart `solaar`. It should not be necessary to edit the rules with the Rule editor, but the rules could instead be created in the GUI. If the rules are not created in the Rule editor, they are not if you edit the file, then you should now restart `solaar`.
## Alt Configuration
The rules can be changed slightly to include diverted "Host Switch Channel" keys. The generalization is quite simple. On the first machine (“alpha”) the rules file become
```yaml
%YAML 1.3
---
- Or:
- Key: [Smart Shift, released]
- Key: [Host Switch Channel 2, released]
- Rule:
- And:
- Active: 654321CD
- Active: 123456AB
- Set: [654321CD, change-host, 1]
- Set: [123456AB, change-host, 1]
- Execute: [notify-send, --category=device, --expire-time=3000, --app-name=solaar,
--icon=/usr/share/solaar/icons/solaar.svg, Change host, Not done – some device not active.]
...
```
The file on the second machine (“beta”) become
```yaml
%YAML 1.3
---
- Or:
- Key: [Smart Shift, released]
- Key: [Host Switch Channel 1, released]
- Rule:
- And:
- Active: 654321CD
- Active: 123456AB
- Set: [654321CD, change-host, 0]
- Set: [123456AB, change-host, 0]
- Execute: [notify-send, --category=device, --expire-time=3000, --app-name=solaar,
--icon=/usr/share/solaar/icons/solaar.svg, Change host, Not done – some device not active.]
...
```
For this to work the additional keys for the keyboard must be set as diverted in the GUI.
## Issues ## Issues
One of the devices can be offline, and then be left while the other does the change. Usually the keyboard will wake up on the previous host when that happen, but occasionally I found the mouse to be the one abandoned on the previous host. That is somewhat weird. Often the state is fixed by reattempting the change once more, or changing back end then retry the change once more. One of the devices can be offline, and then be left while the other does the change. Usually the keyboard will wake up on the previous host when that happen, but occasionally I found the mouse to be the one abandoned on the previous host. That is somewhat weird. Often the state is fixed by reattempting the change once more, or changing back end then retry the change once more.
......
Clone repository
  • Example: Diverted "Host Switch Channel" keys for common devices
  • Example: Diverted "Smart Shift" button for common devices
  • Home