|
| 1 | +"""Python bindings to certain linux input subsystem functions""" |
| 2 | + |
| 3 | +def ioctl_devinfo(fd: int, /) -> tuple[int, int, int, int, str, str, str]: |
| 4 | + """fetch input device info""" |
| 5 | + |
| 6 | +def ioctl_capabilities( |
| 7 | + fd: int, / |
| 8 | +) -> dict[int, list[int | tuple[int, tuple[int, int, int, int, int, int]]]]: |
| 9 | + """fetch input device capabilities""" |
| 10 | + |
| 11 | +def ioctl_EVIOCGABS(fd: int, ev_code: int, /) -> tuple[int, int, int, int, int, int]: |
| 12 | + """get input device absinfo""" |
| 13 | + |
| 14 | +def ioctl_EVIOCSABS( |
| 15 | + fd: int, |
| 16 | + ev_code: int, |
| 17 | + absinfo: tuple[int, int, int, int, int, int], |
| 18 | + /, |
| 19 | +) -> None: |
| 20 | + """set input device absinfo""" |
| 21 | + |
| 22 | +def ioctl_EVIOCGREP(fd: int, /) -> tuple[int, int]: ... |
| 23 | +def ioctl_EVIOCSREP(fd: int, delay: int, period: int, /) -> int: ... |
| 24 | +def ioctl_EVIOCGVERSION(fd: int, /) -> int: ... |
| 25 | +def ioctl_EVIOCGRAB(fd: int, flag: int, /) -> None: ... |
| 26 | +def ioctl_EVIOCGEFFECTS(fd: int, /) -> int: |
| 27 | + """fetch the number of effects the device can keep in its memory.""" |
| 28 | + |
| 29 | +def ioctl_EVIOCG_bits(fd: int, evtype: int, /) -> list[int]: |
| 30 | + """get state of KEY|LED|SND|SW""" |
| 31 | + |
| 32 | +def ioctl_EVIOCGPROP(fd: int, /) -> list[int]: |
| 33 | + """get device properties""" |
| 34 | + |
| 35 | +def device_read(fd: int, /) -> tuple[int, int, int, int, int] | None: |
| 36 | + """read an input event from a device""" |
| 37 | + |
| 38 | +def device_read_many(fd: int, /) -> tuple[tuple[int, int, int, int, int], ...]: |
| 39 | + """read all available input events from a device""" |
| 40 | + |
| 41 | +def upload_effect(fd: int, effect_data: bytes, /) -> int: ... |
| 42 | +def erase_effect(fd: int, ff_id: int, /) -> None: ... |
0 commit comments