input: add features mechanism
This commit discards the simplistic udev check for the ID_KEYBOARD
property in favor of a more direct "feature" probing. This is done for
the following reasons:
- We will need to use input devices which are not necessarily keyboards,
for example the PC speaker to sound the bell.
- To differentiate between keyboard with certain capabilities, such as
LEDs (indicators). We can then perform actions on devices according to
their feature bits.
- We check directly for what we need, i.e. the ability to send/receive
certain evdev events, without relying on logic in udev. This also
reduces our dependency on udev if we ever want to make it optional.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>