summaryrefslogtreecommitdiff
path: root/console-client
diff options
context:
space:
mode:
authorDiego Nieto Cid <dnietoc@gmail.com>2011-03-13 21:28:23 -0300
committerDiego Nieto Cid <dnietoc@gmail.com>2011-04-04 22:26:09 -0300
commit62d95c76fe4f65bd923ad407864fc80fc636e124 (patch)
tree47b5da6e02872c7731869bc057c69aa04b20417b /console-client
parente6d89c3c3fde409a0d50812085de863959170293 (diff)
Export function to load the keaboard layout.
* console-client/xkb/xkb.c (xkb_load_layout): New function. * console-client/xkb/xkb.h (xkb_load_layout): Export prototype.
Diffstat (limited to 'console-client')
-rw-r--r--console-client/xkb/xkb.c15
-rw-r--r--console-client/xkb/xkb.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/console-client/xkb/xkb.c b/console-client/xkb/xkb.c
index 077667dc..fd84c6b6 100644
--- a/console-client/xkb/xkb.c
+++ b/console-client/xkb/xkb.c
@@ -1353,3 +1353,18 @@ xkb_input (keypress_t key)
}
error_t parse_xkbconfig (char *xkbdir, char *xkbkeymapfile, char *xkbkeymap);
+
+error_t
+xkb_load_layout (char *xkbdir, char *xkbkeymapfile, char *xkbkeymap)
+{
+ error_t err;
+ int lastarg;
+
+ err = parse_xkbconfig (xkbdir, xkbkeymapfile, xkbkeymap);
+ if (err)
+ return err;
+
+ determine_keytypes ();
+ interpret_all ();
+ return 0;
+}
diff --git a/console-client/xkb/xkb.h b/console-client/xkb/xkb.h
index 9792431f..3039089e 100644
--- a/console-client/xkb/xkb.h
+++ b/console-client/xkb/xkb.h
@@ -433,3 +433,5 @@ error_t xkb_init_repeat (int delay, int repeat);
void xkb_input (keypress_t key);
int debug_printf (const char *f, ...);
+
+error_t xkb_load_layout (char *xkbdir, char *xkbkeymapfile, char *xkbkeymap);