kmscon/Makefile.am
Ran Benita 6e301a9af3 input: use libxkbcommon to convert input events
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-31 16:18:29 +01:00

94 lines
1.9 KiB
Makefile

ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = kmscon
check_PROGRAMS = test_console test_output test_vt test_buffer test_terminal \
test_input
noinst_LTLIBRARIES = libkmscon-core.la
AM_CFLAGS = \
-Wall
AM_CPPFLAGS = \
-I $(srcdir)/src \
-I $(srcdir)/external
AM_LDFLAGS = \
-Wl,--as-needed
if DEBUG
AM_CFLAGS += -O0 -g
else
AM_CFLAGS += -O2
endif
libkmscon_core_la_SOURCES = \
src/console.c src/console.h \
src/output.c src/output.h \
src/console_char.c \
src/console_cell.c \
src/log.c src/log.h \
src/eloop.c src/eloop.h \
src/vt.c src/vt.h \
src/input.c src/input.h \
src/input-xkb.c src/input-private.h \
external/imKStoUCS.c external\imKStoUCS.h \
src/vte.c src/vte.h \
src/terminal.c src/terminal.h
libkmscon_core_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(DRM_CFLAGS) \
$(EGL_CFLAGS) \
$(GBM_CFLAGS) \
$(OPENGL_CFLAGS) \
$(CAIRO_CFLAGS) \
$(PANGO_CFLAGS) \
$(UDEV_CFLAGS) \
$(XKBCOMMON_CFLAGS)
libkmscon_core_la_LIBADD = \
$(DRM_LIBS) \
$(EGL_LIBS) \
$(GBM_LIBS) \
$(OPENGL_LIBS) \
$(CAIRO_LIBS) \
$(PANGO_LIBS) \
$(UDEV_LIBS) \
$(XKBCOMMON_LIBS)
kmscon_SOURCES = src/main.c
kmscon_LDADD = libkmscon-core.la
test_console_SOURCES = tests/test_console.c
test_console_LDADD = \
libkmscon-core.la \
$(OPENGL_LIBS)
test_console_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(OPENGL_CFLAGS) \
$(CAIRO_CFLAGS)
test_output_SOURCES = tests/test_output.c
test_output_LDADD = \
libkmscon-core.la \
$(OPENGL_LIBS)
test_output_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(OPENGL_CFLAGS)
test_vt_SOURCES = tests/test_vt.c
test_vt_LDADD = libkmscon-core.la
test_buffer_SOURCES = tests/test_buffer.c
test_buffer_LDADD = libkmscon-core.la
test_terminal_SOURCES = tests/test_terminal.c
test_terminal_LDADD = libkmscon-core.la
test_input_SOURCES = tests/test_input.c
test_input_LDADD = \
libkmscon-core.la \
$(XKBCOMMON_LIBS)
test_input_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(XKBCOMMON_CFLAGS)
dist_doc_DATA = README TODO