summaryrefslogtreecommitdiff
path: root/tests/test_input.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-22test_input: use new test_include.h infrastructureDavid Herrmann1-50/+27
test_input compiles again and uses the same helpers as the other tests do. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-20eloop: move prefix to "ev_" instead of "kmscon_"David Herrmann1-11/+11
The long "kmscon_" prefix is horrible so move everything to "ev_" now. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-01-23test_input: simplify and drop xkbcommon dependencyRan Benita1-15/+4
Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-31input: define our own modifiersRan Benita1-10/+10
Just a direct mapping to X modifiers for now (= Shift, Control, Lock, Mod1-5). This gives us more flexibility to adapt it to our needs in the future. Also we don't have to include libxkbcommon headers just for the modifier definitions. Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-31input: don't use 0 to signal lack of unicode valueRan Benita1-1/+1
0 is actually a valid unicode value, so instead we use KMSCON_INPUT_INVALID which is not legal unicode. Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-31input: shuffle headers and includesRan Benita1-0/+3
Just some renames/moving/prefixing to conform to the style of the other files. Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-31input: use libxkbcommon to convert input eventsRan Benita1-3/+54
This commit introduces a new kmscon_input_event structure which is delivered to the input consumer. The information provided is - The evdev scancode (=physical keyboard key). - The X keysym (a symbol representing what the typist really intended). - The active modifiers (e.g. Shift, Control..) - The unicode (UCS-4) value, when it makes sense. To achieve this we add two dependencies: - libxkbcommon (this entails xproto and kbproto, but shouldn't bring any of big X dependencies) - A function to translate keysyms to unicode values (taken from xlib, copied in-tree). libxkbcommon is not an all-around solution, and requires various degrees of supporting code, depending on how much we wish to support. This commit implements the common, basic uses: - Choosing layouts, variants and options - Switching groups - Switching shift-levels - Setting modifiers Though some stuff is missing. Further information in the comments. test_input.c is updated to use the new input event interface. You can change the layouts in input.c:init_input() and see what works and what doesn't. Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-12-31tests: add test for the input subsystemRan Benita1-0/+127
It should: - Capture your keypresses - Announce when a device is added or removed (with --enable-debug) - stop/start capturing on SIGQUIT (Ctrl-\) Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>