libevdev/man/libevdev_grab.txt
Peter Hutterer e8e4bc37c7 Add man-pages for the current interface
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-03 14:15:14 +10:00

51 lines
1.1 KiB
Text

libevdev_grab(3)
================
NAME
----
libevdev_grab - grab the kernel device and become its exclusive user.
SYNOPSIS
--------
#include <libevdev/libevdev.h>
enum EvdevGrabModes {
LIBEVDEV_GRAB,
LIBEVDEV_UNGRAB,
};
int libevdev_grab(struct libevdev *dev, int grab);
DESCRIPTION
-----------
*libevdev_grab* performs an *EVIOCGRAB* on the kernel device, making this
process the exclusive recipient of events from that device. This disrupts
event delivery to other processes including in-kernel consumers of these
events such as *rfkill(1)*. It is usually a bad idea to use this function.
An attempt to grab or ungrab a device already grabbed or currently not
grabbed device will be ignored and returns success.
PARAMETERS
----------
*dev*::
Pointer to the libevdev device.
*grab*::
To grab the device, use LIBEVDEV_GRAB.
To ungrab the device, use LIBEVDEV_UNGRAB.
RETURN VALUE
------------
On success, *libevdev_grab* returns zero. On failure, a negative errno is
returned.
*EINVAL*::
An invalid grab mode was specified.
For a full list of potential error codes consult *ioctl(2)*.