Hardware Reference
In-Depth Information
Table 3-7. UI_SET_RELBIT Options
Macro
Intention
REL_X
Send relative X changes
REL_Y
Send relative Y changes
REL_Z
Send relative Z changes
REL_RX
x-axis tilt
REL_RY
y- axis tilt
REL_RZ
z- axis tilt
REL_HWHEEL
Horizontal wheel change
REL_DIAL
Dial-turn change
REL_WHEEL
Wheel change
REL_MISC
Miscellaneous
Configure EV_ABS
While we don't use the EV_ABS option in this project, it may be useful to introduce this
feature at this point. This event represents absolute cursor movements, and it too requires
registration of intentions. The complete list of EV_ABS codes is defined in linux/input.h .
The usual suspects are defined in Table 3-8 .
Table 3-8. Absolute Cursor Movement Event Macros
Macro
Description
ABS_X
Move X to this absolute X coordinate
ABS_Y
Move Y to this absolute Y coordinate
The following is an example of registering intent for absolute x- and y-axis events:
int rc;
rc = ioctl(fd,UI_SET_ABSBIT,ABS_X);
assert(!rc);
rc = ioctl(fd,UI_SET_ABSBIT,ABS_X);
assert(!rc);
 
 
Search WWH ::




Custom Search