By default, input events are sent to all listening applications and drivers. However, it is possible that the application will capture the device through the evdev interface - look at EVIOCGRAB ioctl() . This will allow only a specific application to receive events from that particular device.
The problem with this approach is that you cannot prevent the propagation of a specific event after it is received - you can only capture the device in advance, and then capture all the events. Therefore, if you want to filter input events, you must use a workaround.
The workaround I used in my evmapd included capturing the source device and using the uinput subsystem to provide another device with all the changes I needed, including reassigned keys and various other changes ...
source share