diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-03 20:19:30 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-03 20:19:30 +0000 |
commit | 32a233e4de196ca4f742c96e01fcc0b933a0bbcd (patch) | |
tree | 0bbd0fab262871fd01cb93a725faa92b752d4913 | |
parent | 71d6502cc9a457b68ffe53bbe0af6d8b1b2a58d2 (diff) |
LK-401 french layout, tested on actual keyboard (I even have two of them
in the closet, does anyone want them?)
-rw-r--r-- | share/man/man4/man4.vax/lkkbd.4 | 127 | ||||
-rw-r--r-- | sys/arch/vax/dec/dzkbd.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/dec/wskbdmap_lk201.c | 34 |
3 files changed, 157 insertions, 10 deletions
diff --git a/share/man/man4/man4.vax/lkkbd.4 b/share/man/man4/man4.vax/lkkbd.4 index 9219ca6fae2..4b84c201e47 100644 --- a/share/man/man4/man4.vax/lkkbd.4 +++ b/share/man/man4/man4.vax/lkkbd.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: lkkbd.4,v 1.5 2006/07/31 21:58:55 miod Exp $ +.\" $OpenBSD: lkkbd.4,v 1.6 2006/08/03 20:19:28 miod Exp $ .\" .\" Copyright (c) 2003 Jason L. Wright (jason@thought.net) .\" All rights reserved. @@ -24,7 +24,31 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 31, 2006 +.\" Copyright (c) 1999 +.\" Matthias Drochner. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd August 3, 2006 .Dt LKKBD 4 vax .Os .Sh NAME @@ -33,6 +57,7 @@ .Sh SYNOPSIS .Cd "lkkbd0 at dz0 line 0" .Cd "wskbd* at lkkbd?" +.Cd "option LKKBD_LAYOUT=XXX" .Sh DESCRIPTION The .Nm @@ -41,13 +66,105 @@ driver provides support for DEC LK201 and LK401 keyboards connected to serial controllers within the .Xr wscons 4 framework. +.Pp +The +.Nm +driver supports a number of different key mappings which +can be chosen from with the kernel option +.Dq LKKBD_LAYOUT +at compile time or with the utility +.Xr wsconsctl 8 +(variable: +.Dq keyboard.encoding +) at runtime. +Other mappings can be used if the whole keymap is replaced by means of +.Xr wsconsctl 8 . +The built-in mappings are at this time: +.Bl -hang +.\" .It KB_BE +.\" ( +.\" .Dq be +.\" ) Belgium French. +.\" .It KB_CF +.\" ( +.\" .Dq cf +.\" ) Canadian French. +.\" .It KB_DE +.\" ( +.\" .Dq de +.\" ) German with +.\" .Dq dead accents . +.\" .It KB_DK +.\" ( +.\" .Dq dk +.\" ) Danish with +.\" .Dq dead accents . +.\" .It KB_ES +.\" ( +.\" .Dq es +.\" ) Spanish. +.It KB_FR +( +.Dq fr +) French. +.\" .It KB_IT +.\" ( +.\" .Dq it +.\" ) Italian. +.\" .It KB_NO +.\" ( +.\" .Dq no +.\" ) Norwegian with +.\" .Dq dead accents . +.\" .It KB_PT +.\" ( +.\" .Dq pt +.\" ) Portuguese. +.\" .It KB_SF +.\" ( +.\" .Dq sf +.\" ) Swiss French with +.\" .Dq dead accents . +.\" .It KB_SG +.\" ( +.\" .Dq sg +.\" ) Swiss German with +.\" .Dq dead accents . +.\" .It KB_SV +.\" ( +.\" .Dq sv +.\" ) Swedish with +.\" .Dq dead accents . +.\" .It KB_UK +.\" ( +.\" .Dq uk +.\" ) British. +.It KB_US +( +.Dq us +) English / US keyboard mapping (default). +.El +.Pp +.\" The KB_DE, KB_DK, KB_NO, KB_SF, KB_SG and KB_SV mappings can be used in +.\" the KB_NODEAD ( +.\" .Dq .nodead +.\" ) variant. +.\" This switches off the +.\" .Dq dead accents . +.Sh EXAMPLES +To set a French keyboard layout, use +.Ic wsconsctl -w keyboard.encoding=fr . +To set it at kernel build time, add +the following to the kernel configuration file: +.Bd -literal -offset indent +option LKKBD_LAYOUT="KB_FR" +.Ed .Sh SEE ALSO .Xr dz 4 , .Xr intro 4 , .Xr wscons 4 , -.Xr wskbd 4 -.\" when international layouts are added -.\" .Xr wsconsctl 8 +.Xr wskbd 4 , +.Xr wsconsctl 8 .Sh CAVEATS The LK-201 keyboard does not have a .Dq Meta diff --git a/sys/arch/vax/dec/dzkbd.c b/sys/arch/vax/dec/dzkbd.c index 56cfbf1db71..bc94bd90379 100644 --- a/sys/arch/vax/dec/dzkbd.c +++ b/sys/arch/vax/dec/dzkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dzkbd.c,v 1.9 2006/07/31 21:57:05 miod Exp $ */ +/* $OpenBSD: dzkbd.c,v 1.10 2006/08/03 20:19:29 miod Exp $ */ /* $NetBSD: dzkbd.c,v 1.1 2000/12/02 17:03:55 ragge Exp $ */ /* @@ -114,8 +114,8 @@ const struct wskbd_consops dzkbd_consops = { const struct wskbd_mapdata dzkbd_keymapdata = { lkkbd_keydesctab, -#ifdef DZKBD_LAYOUT - DZKBD_LAYOUT, +#ifdef LKKBD_LAYOUT + LKKBD_LAYOUT, #else KB_US, #endif diff --git a/sys/arch/vax/dec/wskbdmap_lk201.c b/sys/arch/vax/dec/wskbdmap_lk201.c index 1fbb724b2ba..09ed95e6a4b 100644 --- a/sys/arch/vax/dec/wskbdmap_lk201.c +++ b/sys/arch/vax/dec/wskbdmap_lk201.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbdmap_lk201.c,v 1.4 2006/07/31 21:57:05 miod Exp $ */ +/* $OpenBSD: wskbdmap_lk201.c,v 1.5 2006/08/03 20:19:29 miod Exp $ */ /* $NetBSD: wskbdmap_lk201.c,v 1.4 2000/12/02 16:57:41 ragge Exp $ */ #include <sys/types.h> @@ -65,7 +65,7 @@ static const keysym_t lkkbd_keydesc_us[] = { KC(175), KS_Cmd1, KS_Control_L, KC(176), KS_Caps_Lock, KC(177), KS_Multi_key, /* (left) compose */ /* LK 401 */ - KC(178), KS_Alt_R, /* LK 401 */ + KC(178), KS_Cmd2, KS_Alt_R, /* LK 401 */ KC(188), KS_Delete, KC(189), KS_Return, KC(190), KS_Tab, @@ -122,11 +122,41 @@ static const keysym_t lkkbd_keydesc_us[] = { KC(252), KS_Cmd2, KS_Alt_L, KS_Multi_key }; +static const keysym_t lkkbd_keydesc_fr[] = { + KC(178), KS_Cmd2, KS_Mode_switch, + KC(192), KS_ampersand, KS_1, + KC(193), KS_a, + KC(194), KS_q, + KC(195), KS_w, + KC(197), KS_eacute, KS_2, + KC(198), KS_z, + KC(203), KS_quotedbl, KS_3, + KC(208), KS_apostrophe, KS_4, + KC(214), KS_parenleft, KS_5, + KC(219), KS_section, KS_6, KS_bracketleft, + KC(224), KS_egrave, KS_7, KS_bracketright, + KC(227), KS_comma, KS_question, + KC(229), KS_exclam, KS_8, + KC(232), KS_semicolon, KS_period, + KC(234), KS_ccedilla, KS_9, KS_braceleft, + KC(237), KS_colon, KS_slash, + KC(239), KS_agrave, KS_0, KS_braceright, + KC(242), KS_m, + KC(243), KS_equal, KS_plus, + KC(245), KS_minus, KS_underscore, + KC(246), KS_dollar, KS_asterisk, + KC(247), KS_numbersign, KS_at, + KC(249), KS_parenright, KS_degree, + KC(250), KS_dead_circumflex, KS_dead_diaeresis, + KC(251), KS_ugrave, KS_percent, KS_backslash, +}; + #define KBD_MAP(name, base, map) \ { name, base, sizeof(map)/sizeof(keysym_t), map } const struct wscons_keydesc lkkbd_keydesctab[] = { KBD_MAP(KB_US, 0, lkkbd_keydesc_us), + KBD_MAP(KB_FR, KB_US, lkkbd_keydesc_fr), {0, 0, 0, 0} }; |