]> git.baikalelectronics.ru Git - kernel.git/commit
Input: implement input filters
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 30 Jan 2010 07:59:12 +0000 (23:59 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 30 Jan 2010 09:47:41 +0000 (01:47 -0800)
commitdfd87a75228c47e89de6350e007969b086a4e064
tree9d3fe13ae7a288f77dbc0e1b07813ce23f9106d3
parentd1dcb196b52a66a4efded71cbe50a85539238808
Input: implement input filters

Sometimes it is desirable to suppress certain events from reaching
input handlers and thus user space. One such example is Mac mouse
button emulation code which catches certain key presses and converts
them into button clicks as if they were emitted by a virtual mouse.
The original key press events should be completely suppressed,
otherwise user space will be confused, and while keyboard driver
does it on its own evdev is blissfully unaware of this arrangement.

This patch adds notion of 'filter' to the standard input handlers,
which may flag event as filtered thus preventing it from reaching
other input handlers. Filters don't (nor will they ever) have a
notion of priority relative to each other, input core will run all
of them first and any one of them may mark event as filtered.

This patch is inspired by similar patch by Matthew Garret but the
implementation and intended usage are quite different.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/input.c
include/linux/input.h