aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fbcon.c12
-rw-r--r--kbd.c13
-rw-r--r--kbd.h6
3 files changed, 19 insertions, 12 deletions
diff --git a/fbcon.c b/fbcon.c
index d3ac663..db76b85 100644
--- a/fbcon.c
+++ b/fbcon.c
@@ -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;
diff --git a/kbd.c b/kbd.c
index d9ce8b3..9dd8241 100644
--- a/kbd.c
+++ b/kbd.c
@@ -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;
diff --git a/kbd.h b/kbd.h
index fc5048e..82130a0 100644
--- a/kbd.h
+++ b/kbd.h
@@ -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,