input: add features mechanism
authorRan Benita <ran234@gmail.com>
Sun, 4 Mar 2012 16:43:19 +0000 (18:43 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 20 Mar 2012 18:00:45 +0000 (19:00 +0100)
commit6b7265447e7e06be7e48d91a8c1bae9b6525c886
treec248f02329bac6da5b05ded6e1f43a92422b4b43
parentd8cf293c94dabeb94370b8a53784db2c19967a9d
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>
src/input.c
src/input.h