Comments (2)
This is currently not possible.
It does seem like a feature worth adding, however it is not simple to extend the --map
syntax to make this possible due to details of implementation, the evdev protocol, and UX.
So I am considering adding a --rel-to-abs
argument (relatedly: I think it was a a mistake to add relative maps instead of a --abs-to-rel
argument), which would look something like either...
--input /dev/input/by-id/[mouse] \
--rel-to-abs range=0~255 speed=1 \
--output
... or ...
--input /dev/input/by-id/[mouse] \
--rel-to-abs rel:x abs:x:0~255 speed=1 \
--rel-to-abs rel:y abs:y:0~255 speed=1 \
--output
... but I'm still figuring out some UI aspects of it. (I'll follow up on this later, I just thought I should write something to show that this issue isn't getting ignored...)
from evsieve.
I have now implemented the --rel-to-abs
argument on the master branch according to the second plan:
--input /dev/input/by-id/[mouse] \
--rel-to-abs rel:x abs:x:0~255 speed=1 \
--rel-to-abs rel:y abs:y:0~255 speed=1 \
--output
I'm not sure if I actually like the current design though. I may significantly change the API before this reaches stable, but you can already use it if you don't mind your scripts getting broken in a future update.
Maybe I should make more generic and rename it to --add-to
instead. Or maybe it should be more specific and have a way to map rel:x → abs:x
, rel:y → abs:y
, rel:z → abs:z
, rel:rx → abs:rx
, rel:ry → abs:ry
, rel:rz → abs:rz
without using six arguments, one for each of those.
It currently requires you to define a range for the output values, because the evdev protocol requires you to define which range the values can take. But maybe it is possible to figure out some sensible default range if the user does not provide one?
Relatedly, currently the initial value of the axes is zero. Maybe it should instead be the center of the output range, which makes sense for rel-to-abs conversion, but perhaps not if I were to rename the argument to something generic like --add-to
.
Also undecided on whether I should keep the speed
clause. It currently causes some i32-to-f64-to-i32 conversions in the internal mechanics, even if the default speed of 1
is used (which I imagine to be the by-far-most-common usage.) Those conversions don't use that much computing power, but it still feels a bit bloaty. Multiplying values by a factor is already possible with --map
anyway (e.g. --map abs ::2x
will double the value of all abs-type events.)
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
- 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.