aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2016-04-07 20:12:45 +0000
committerEd Maste <emaste@FreeBSD.org>2016-04-07 20:12:45 +0000
commit46360281f0a255c0a13878df6b9df4d140350c68 (patch)
treefa315ca609af862662c08b296892de58baea440e
parentbcfa4e676b9bd1798bf1d1a018269d3746b7a229 (diff)
Add option to specify built-in keymap for kbdmux
PR: 153459 Submitted by: swell.k@gmail.com
Notes
Notes: svn path=/head/; revision=297685
-rw-r--r--sys/conf/NOTES4
-rw-r--r--sys/conf/files4
-rw-r--r--sys/conf/options2
-rw-r--r--sys/dev/kbdmux/kbdmux.c8
-rw-r--r--sys/modules/kbdmux/Makefile2
5 files changed, 19 insertions, 1 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index c9fce2e6702c..42570fe55b8b 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -1409,6 +1409,10 @@ options MSGBUF_SIZE=40960
options KBD_DISABLE_KEYMAP_LOAD # refuse to load a keymap
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
+device kbdmux # keyboard multiplexer
+options KBDMUX_DFLT_KEYMAP # specify the built-in keymap
+makeoptions KBDMUX_DFLT_KEYMAP=it.iso
+
options FB_DEBUG # Frame buffer debugging
device splash # Splash screen and screen saver support
diff --git a/sys/conf/files b/sys/conf/files
index e2dbc6780a7d..46e9768ee4b9 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -47,6 +47,10 @@ pccarddevs.h standard \
compile-with "${AWK} -f $S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \
no-obj no-implicit-rule before-depend \
clean "pccarddevs.h"
+kbdmuxmap.h optional kbdmux_dflt_keymap \
+ compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${KBDMUX_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > kbdmuxmap.h" \
+ no-obj no-implicit-rule before-depend \
+ clean "kbdmuxmap.h"
teken_state.h optional sc | vt \
dependency "$S/teken/gensequences $S/teken/sequences" \
compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \
diff --git a/sys/conf/options b/sys/conf/options
index 4df24a56fc75..f2fef263f974 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -801,6 +801,8 @@ KBD_MAXWAIT opt_kbd.h
KBD_RESETDELAY opt_kbd.h
KBDIO_DEBUG opt_kbd.h
+KBDMUX_DFLT_KEYMAP opt_kbdmux.h
+
# options for the Atheros driver
ATH_DEBUG opt_ath.h
ATH_TXBUF opt_ath.h
diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c
index a21b37cdf095..0dce120ad6a8 100644
--- a/sys/dev/kbdmux/kbdmux.c
+++ b/sys/dev/kbdmux/kbdmux.c
@@ -33,6 +33,7 @@
#include "opt_compat.h"
#include "opt_kbd.h"
+#include "opt_kbdmux.h"
#include <sys/param.h>
#include <sys/bus.h>
@@ -54,6 +55,13 @@
#include <sys/taskqueue.h>
#include <sys/uio.h>
#include <dev/kbd/kbdreg.h>
+
+/* the initial key map, accent map and fkey strings */
+#ifdef KBDMUX_DFLT_KEYMAP
+#define KBD_DFLT_KEYMAP
+#include "kbdmuxmap.h"
+#endif
+
#include <dev/kbd/kbdtables.h>
#define KEYBOARD_NAME "kbdmux"
diff --git a/sys/modules/kbdmux/Makefile b/sys/modules/kbdmux/Makefile
index 70b39a05a9cf..363343a87db1 100644
--- a/sys/modules/kbdmux/Makefile
+++ b/sys/modules/kbdmux/Makefile
@@ -4,7 +4,7 @@
.PATH: ${.CURDIR}/../../dev/kbdmux
KMOD= kbdmux
-SRCS= kbdmux.c opt_compat.h opt_kbd.h bus_if.h device_if.h
+SRCS= kbdmux.c opt_compat.h opt_kbd.h opt_kbdmux.h bus_if.h device_if.h
.if !defined(KERNBUILDDIR)
opt_compat.h: