Age | Commit message (Collapse) | Author | Files | Lines |
|
test_input compiles again and uses the same helpers as the other tests do.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
The long "kmscon_" prefix is horrible so move everything to "ev_" now.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|