Comments (7)
@puffnfresh I suppose that it wouldn't be impossible to implement, but with the current internal API, it isn't simple to implement it in a way that:
- Is correct in all cases, i.e. including cases where multiple devices can generate
abs:z
events, which in turn are being transformed by other maps before reaching a map containingz_min
. - Does not impose a measurable performance penalty for the majority of the users who won't use this feature.
The key issue is: parsing the input arguments like abz:z
to internal data structures, propagating the event capabilities, and propagating the events, happen at separate stages of the program. A feature like this blurs the line between those stages; e.g. it is currently assumed (and enforced by the compiler) that the propagation of event capabilities does not modify the event stream, and that assumption would need to change to make this work, along with at least one algorithm that relies on it.
In short, I think that I am not going to work on that feature for now because the amount of spaghettiness required to make it work outweighs the feature's utility.
from evsieve.
Not possible on the current stable version. I just added a feature to do this to the main branch. The tentative syntax is:
--map abs:x abs:x:-x
Now a somewhat confusing part of this syntax is that the last x
just means "whatever the value value was", and the minus means "-1 times that value". The last x
does not mean "the value of the x axis", so to invert the y
axis, you would also use:
--map abs:y abs:y:-x
The magic x
multiplier in the value has the same consistent syntax as the magic d
multiplier (which, ironically, is already stable), but since users will probably use it mainly for inverting/accelerating the x/y axes, I can imagine some poor user getting confused and trying to write --map abs:y abs:y:-y
.
I could either write a specialised helpful error message for that case, or reconsider the syntax of this feature.
from evsieve.
In fact it is not exacly *-1
It is more max_value - x to revert thé axis.
from evsieve.
In case min IS positiv
from evsieve.
This feature has now been added to the main branch. You can now e.g. write --map abs:z abs:z:127-x
to map some event's value to 127 minus that event's value, which would invert the axis if abs:z
were to have a range of 0~127.
from evsieve.
@KarsMulder since evdev events are registered with min/max values, we theoretically know the min/max. Could we add/generate another placeholder (e.g. z_min
) so that we don't have to hard code the 127
?
from evsieve.
working for me. i can close.
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.