Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Mouse is absolute, and therefore pretty useless, maybe use EV_REL instead? #7

Open
hacker1024 opened this issue Jan 24, 2018 · 0 comments

Comments

@hacker1024
Copy link

From the linux input documentation:

In addition to EV_KEY, there are two more basic event types: EV_REL and
EV_ABS. They are used for relative and absolute values supplied by the
device. A relative value may be for example a mouse movement in the X axis.
The mouse reports it as a relative difference from the last position,
because it doesn't have any absolute coordinate system to work in. Absolute
events are namely for joysticks and digitizers - devices that do work in an
absolute coordinate systems.

Having the device report EV_REL buttons is as simple as with EV_KEY, simply
set the corresponding bits and call the

input_report_rel(struct input_dev *dev, int code, int value)

function. Events are generated only for nonzero value.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant