diff options
-rw-r--r-- | fbcon.c | 12 | ||||
-rw-r--r-- | kbd.c | 13 | ||||
-rw-r--r-- | kbd.h | 6 |
3 files changed, 19 insertions, 12 deletions
@@ -29,7 +29,6 @@ #include <libudev.h> #include <libinput.h> #include <libtsm.h> -#include <xkbcommon/xkbcommon.h> #include "fbtools.h" #include "drmtools.h" @@ -61,17 +60,6 @@ static struct udev *udev; static struct libinput *kbd; static bool logind = false; -static struct xkb_context *xkb_ctx; -static struct xkb_keymap *xkb_map; -static struct xkb_state *xkb_state; -static struct xkb_rule_names xkb_layout = { - .rules = NULL, - .model = "pc105", - .layout = "us", - .variant = NULL, - .options = NULL, -}; - static struct tsm_screen *vts; static struct tsm_vte *vte; static bool tsm_sb; @@ -15,6 +15,19 @@ /* ---------------------------------------------------------------------- */ +struct xkb_context *xkb_ctx; +struct xkb_keymap *xkb_map; +struct xkb_state *xkb_state; +struct xkb_rule_names xkb_layout = { + .rules = NULL, + .model = "pc105", + .layout = "us", + .variant = NULL, + .options = NULL, +}; + +/* ---------------------------------------------------------------------- */ + struct termctrl { const char *seq; uint32_t code; @@ -4,6 +4,7 @@ #include <libudev.h> #include <libinput.h> +#include <xkbcommon/xkbcommon.h> #define KEY_MOD_SHIFT (1 << 0) #define KEY_MOD_CTRL (1 << 1) @@ -12,6 +13,11 @@ extern int libinput_devcount; extern int libinput_deverror; extern const struct libinput_interface libinput_if_default; +extern struct xkb_context *xkb_ctx; +extern struct xkb_keymap *xkb_map; +extern struct xkb_state *xkb_state; +extern struct xkb_rule_names xkb_layout; + void kbd_init(int use_libinput, dev_t gfx); int kbd_wait(int timeout); int kbd_read(char *buf, uint32_t len, |