|
| #define | input_event_sec time.tv_sec |
| |
| #define | input_event_usec time.tv_usec |
| |
| #define | EV_VERSION 0x010001 |
| |
| #define | INPUT_KEYMAP_BY_INDEX (1 << 0) |
| |
| #define | EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
| |
| #define | EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
| |
| #define | EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
| |
| #define | EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
| |
| #define | EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
| |
| #define | EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry) |
| |
| #define | EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ |
| |
| #define | EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) |
| |
| #define | EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
| |
| #define | EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
| |
| #define | EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ |
| |
| #define | EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ |
| |
| #define | EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len) |
| |
| #define | EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ |
| |
| #define | EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
| |
| #define | EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ |
| |
| #define | EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ |
| |
| #define | EVIOCGBIT(ev, len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */ |
| |
| #define | EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */ |
| |
| #define | EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */ |
| |
| #define | EVIOCSFF _IOW('E', 0x80, struct ff_effect) /* send a force effect to a force feedback device */ |
| |
| #define | EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ |
| |
| #define | EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ |
| |
| #define | EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
| |
| #define | EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */ |
| |
| #define | EVIOCGMASK _IOR('E', 0x92, struct input_mask) /* Get event-masks */ |
| |
| #define | EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */ |
| |
| #define | EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ |
| |
| #define | ID_BUS 0 |
| |
| #define | ID_VENDOR 1 |
| |
| #define | ID_PRODUCT 2 |
| |
| #define | ID_VERSION 3 |
| |
| #define | BUS_PCI 0x01 |
| |
| #define | BUS_ISAPNP 0x02 |
| |
| #define | BUS_USB 0x03 |
| |
| #define | BUS_HIL 0x04 |
| |
| #define | BUS_BLUETOOTH 0x05 |
| |
| #define | BUS_VIRTUAL 0x06 |
| |
| #define | BUS_ISA 0x10 |
| |
| #define | BUS_I8042 0x11 |
| |
| #define | BUS_XTKBD 0x12 |
| |
| #define | BUS_RS232 0x13 |
| |
| #define | BUS_GAMEPORT 0x14 |
| |
| #define | BUS_PARPORT 0x15 |
| |
| #define | BUS_AMIGA 0x16 |
| |
| #define | BUS_ADB 0x17 |
| |
| #define | BUS_I2C 0x18 |
| |
| #define | BUS_HOST 0x19 |
| |
| #define | BUS_GSC 0x1A |
| |
| #define | BUS_ATARI 0x1B |
| |
| #define | BUS_SPI 0x1C |
| |
| #define | BUS_RMI 0x1D |
| |
| #define | BUS_CEC 0x1E |
| |
| #define | BUS_INTEL_ISHTP 0x1F |
| |
| #define | BUS_AMD_SFH 0x20 |
| |
| #define | BUS_SDW 0x21 |
| |
| #define | MT_TOOL_FINGER 0x00 |
| |
| #define | MT_TOOL_PEN 0x01 |
| |
| #define | MT_TOOL_PALM 0x02 |
| |
| #define | MT_TOOL_DIAL 0x0a |
| |
| #define | MT_TOOL_MAX 0x0f |
| |
| #define | FF_STATUS_STOPPED 0x00 |
| |
| #define | FF_STATUS_PLAYING 0x01 |
| |
| #define | FF_STATUS_MAX 0x01 |
| |
| #define | FF_HAPTIC 0x4f |
| |
| #define | FF_RUMBLE 0x50 |
| |
| #define | FF_PERIODIC 0x51 |
| |
| #define | FF_CONSTANT 0x52 |
| |
| #define | FF_SPRING 0x53 |
| |
| #define | FF_FRICTION 0x54 |
| |
| #define | FF_DAMPER 0x55 |
| |
| #define | FF_INERTIA 0x56 |
| |
| #define | FF_RAMP 0x57 |
| |
| #define | FF_EFFECT_MIN FF_HAPTIC |
| |
| #define | FF_EFFECT_MAX FF_RAMP |
| |
| #define | FF_SQUARE 0x58 |
| |
| #define | FF_TRIANGLE 0x59 |
| |
| #define | FF_SINE 0x5a |
| |
| #define | FF_SAW_UP 0x5b |
| |
| #define | FF_SAW_DOWN 0x5c |
| |
| #define | FF_CUSTOM 0x5d |
| |
| #define | FF_WAVEFORM_MIN FF_SQUARE |
| |
| #define | FF_WAVEFORM_MAX FF_CUSTOM |
| |
| #define | FF_GAIN 0x60 |
| |
| #define | FF_AUTOCENTER 0x61 |
| |
| #define | FF_MAX_EFFECTS FF_GAIN |
| |
| #define | FF_MAX 0x7f |
| |
| #define | FF_CNT (FF_MAX+1) |
| |
| #define EVIOCGMASK _IOR('E', 0x92, struct input_mask) /* Get event-masks */ |
EVIOCGMASK - Retrieve current event mask
This ioctl allows user to retrieve the current event mask for specific event type. The argument must be of type "struct input_mask" and specifies the event type to query, the address of the receive buffer and the size of the receive buffer.
The event mask is a per-client mask that specifies which events are forwarded to the client. Each event code is represented by a single bit in the event mask. If the bit is set, the event is passed to the client normally. Otherwise, the event is filtered and will never be queued on the client's receive buffer.
Event masks do not affect global state of the input device. They only affect the file descriptor they are applied to.
The default event mask for a client has all bits set, i.e. all events are forwarded to the client. If the kernel is queried for an unknown event type or if the receive buffer is larger than the number of event codes known to the kernel, the kernel returns all zeroes for those codes.
At maximum, codes_size bytes are copied.
This ioctl may fail with ENODEV in case the file is revoked, EFAULT if the receive-buffer points to invalid memory, or EINVAL if the kernel does not implement the ioctl.
EVIOCGMTSLOTS(len) - get MT slot values @len: size of the data buffer in bytes
The ioctl buffer argument should be binary equivalent to
struct input_mt_request_layout { __u32 code; __s32 values[num_slots]; };
where num_slots is the (arbitrary) number of MT slots to extract.
The ioctl size argument (len) is the size of the buffer, which should satisfy len = (num_slots + 1) * sizeof(__s32). If len is too small to fit all available slots, the first num_slots are returned.
Before the call, code is set to the wanted ABS_MT event type. On return, values[] is filled with the slot values for the specified ABS_MT code.
If the request code is not an ABS_MT value, -EINVAL is returned.
| #define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */ |
EVIOCSMASK - Set event mask
This ioctl is the counterpart to EVIOCGMASK. Instead of receiving the current event mask, this changes the client's event mask for a specific type. See EVIOCGMASK for a description of event-masks and the argument-type.
This ioctl provides full forward compatibility. If the passed event type is unknown to the kernel, or if the number of event codes specified in the mask is bigger than what is known to the kernel, the ioctl is still accepted and applied. However, any unknown codes are left untouched and stay cleared. That means, the kernel always filters unknown codes regardless of what the client requests. If the new mask doesn't cover all known event-codes, all remaining codes are automatically cleared and thus filtered.
This ioctl may fail with ENODEV in case the file is revoked. EFAULT is returned if the receive-buffer points to invalid memory. EINVAL is returned if the kernel does not implement the ioctl.