Comments (1)
Maybe something like the following can solve your problem?
--input /dev/input/by-id/YOUR_KEYBOARD persist=reopen domain=kb grab \
--input /dev/input/by-id/usb-SteelSeries_SteelSeries_Aerox_3_Wireless-event-mouse persist=reopen domain=ms grab \
--toggle @kb @guest-kb @host-kb @gmac-kb @hmac-kb \
--toggle @ms @guest-ms @host-ms @gmac-kb @hmac-kb \
--hook key:leftalt@host-kb key:rightalt@host-kb toggle=:1 exec-shell="sudo ddcutil --display=1 setvcp 60 0x0f" \
--hook key:leftshift@host-kb key:rightshift@host-kb toggle=:4 exec-shell="barrierctl switchtob" \
--hook key:leftalt@guest-kb key:rightalt@guest-kb toggle=:2 exec-shell="sudo ddcutil --display=1 setvcp 60 0x13" \
--hook key:leftshift@guest-kb key:rightshift@guest-kb toggle=:3 exec-shell="barrierctl switchtob" \
--hook key:leftalt@gmac-kb key:rightalt@gmac-kb toggle=:4 exec-shell="sudo ddcutil --display=1 setvcp 60 0x13" \
--hook key:leftshift@gmac-kb key:rightshift@gmac-kb toggle=:1 exec-shell="barrierctl switchtoa" \
--hook key:leftalt@hmac-kb key:rightalt@hmac-kb toggle=:3 exec-shell="sudo ddcutil --display=1 setvcp 60 0x0f" \
--hook key:leftshift@hmac-kb key:rightshift@hmac-kb toggle=:2 exec-shell="barrierctl switchtoa" \
--output @host-kb @hmac-kb @gmac-kb create-link=/dev/input/by-id/host-kbd \
--output @host-ms @hmac-ms @gmac-ms create-link=/dev/input/by-id/host-mouse \
--output @guest-kb create-link=/dev/input/by-id/guest-kbd \
--output @guest-ms create-link=/dev/input/by-id/guest-mouse
It internally considers four different states: (1) guest screen is active, controlling main pc; (2) host screen active, controlling main pc, (3) guest screen active, controlling mac, (4) host screen active, controlling mac,. For each of those four states, it provides hotkeys to transition between them. Whenever either the host screen is active or the mac is being controlled, the keys are outputted on the host devices.
(Yes, I acknowledge that the above script is a bit unwieldy.)
from evsieve.
Related Issues (20)
- Question re switching 1 kbd between multiple VMs HOT 3
- Possible to block regular key output while pressing a hook keyboard combo? HOT 4
- Multi-touch finger count HOT 1
- Unknown event code mapping/copy issue HOT 2
- Possibility to map undefined keys (EV_KEY 300, 301) HOT 1
- 100% CPU usage when using --control-fifo HOT 2
- Handling of bluetooth input devices (no persistent device name, device may be unavailable at startup) HOT 2
- [RFC] Configuration file HOT 7
- compilation issues on 32 bits boards (+ patch) HOT 1
- Make virtual keyboard acts like "physical" HOT 3
- Is it possible to map a mouse's relative position to a controller's analog stick absolute position? HOT 2
- how to output as a virtual joystick? HOT 3
- will this work with Multi-pointers? HOT 2
- Key repeat request to kernel HOT 2
- Mouse Accelertion Profile & Pointer Speed HOT 1
- Multi bouton support? HOT 1
- `persist=reopen` does not prevent evsieve from exiting HOT 7
- Generating scroll event from hook HOT 1
- Question: is realtime scheduling priority needed/advised on underpowered hosts? HOT 2
- Slow vertical mouse movements aren't registered when using "--map rel ::0.5x" to reduce mouse sensitivity HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evsieve.