Comments (2)
Similar issue: #7
What are your thoughts on this?
I agree evsieve needs a more ergonomic way to do this, but I have still not figured out the best way to do it. There are particularly a lot of edge cases to deal with if we want to conditionally block some input events depending on whether or not a multiple-to-one map happened or not.
--map key:leftctrl key:comma key:f4 source=2
I am not a fan of this syntax because its semantics are different from the usual --map
semantics.
If I were to expand the --map
to do this, I'd probably do something like --map key:comma key:f4 hold=key:leftctrl
, where hold=
indicates that the map only applies if the key:leftctrl
key is held down, though this approach still has two inelegant points:
- The key after
hold=
would have to be interpreted with the same semantics as used by--hook
which are different from the semantics used by--map
(i.e. an unspecified event value is interpreted as1~
by--hook
, whereas--map
interprets it as "any value"); - There would have to be some "consistent" mode for maps similar to how
--toggle
treats EV_KEY type events differently from other events.
... now I think about it, these two inelegant points may be less severe than the mess that --hook withhold
or --hook --withhold
might create. I should consider this approach some more.
(although not documented yet!)
The documentation in the README is for the latest stable version of evsieve (1.3.1 right now.) The send-key
clause is not part of any stable release yet. Features not part of a stable release are subject to getting changed/removed/redesigned at any time, therefore the average user is not recommended to use them.
By the way, in the above script you do not want to use mode=passive
on the --toggle
because your script would result in a stuck F4 key if you were to press key:leftctrl:1 key:comma:1 key:leftctrl:0 key:comma:0
. The consistent mode is the default mode of toggles because it avoids pitfalls like this.
from evsieve.
Great to hear your thoughts on this and the edge cases that would have to be dealt with if being implemented.
-map key:comma key:f4 hold=key:leftctrl
is a better intuitive syntax.
Thank you for clarification on mode=passive
vs mode=consistent
that I overlooked in my original example.
If you do decide to implement, I'll be looking forward to such a feature.
from evsieve.
Related Issues (20)
- 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
- Using evsieve to use Wiimote as a mouse: Is it possible? HOT 1
- Hold down key HOT 2
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.