hook and stop /dev/input/event lazarus / 32-Linux ---------------------------------------------------------------------- guest59697 · 2018-06-01 08:14 hello Thaddy, hello FPC enthusiasts, please a low level question: I have a touchscreen linux embedded, I don't have the source of the drivers, I know that the driver maps over /dev/input/event4 -> and the events are forwarded/emulated to  -> /dev/mouse1 I need to be able to stop/inhibit the event4 event bubbling, so stopping the touchscreen, and reenable it without change the config of X, and without exit from the X session. Do you know if a HOOK api or similar can be used to STOP/RESTART /dev/input/event4 globally, for the whole system/users? Thank you. Roberto. ---------------------------------------------------------------------- Thaddy · 2018-06-01 08:36 Hi Roberto, only with sudo rights. It also depends on the system. Btw How are you doing? Haven't spoken to you in a long time. Technically you should be able to start and stop the device w/o affecting the X session(s) ---------------------------------------------------------------------- guest59697 · 2018-06-01 09:43 hello, well, I'm very busy, although this summer I'll try to give to this fpc community a little layer for a intel mem manager (parallel). Look, using chmod, setting no permission at all to /dev/input/event doesn't stop it (probably if it is already open by another task, does nothing, affecting only the next open's) Any idea? Maybe using mmap function? ---------------------------------------------------------------------- sash · 2018-06-08 20:16 Hello, I think you can disable device in udev rules Also I suppose you don't have to. Grab (open exclusively) device file with Code: C  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ioctl(fd, EVIOCGRAB, ...); so events would be visible to your app only.