From 4376fdc4db2da5c34140e19d73064b3e5ccb0b7c Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 9 Aug 2008 16:31:09 +0000 Subject: Add the fr-dvorak-be'po layout as fr.dvorak for ps/2 and usb keyboards. This is only the simplified layout, which is final; the complete layout with extra symbols is still being discussed. --- share/man/man4/pckbd.4 | 12 ++++++-- share/man/man4/ukbd.4 | 12 ++++++-- sys/dev/pckbc/wskbdmap_mfii.c | 64 ++++++++++++++++++++++++++++++++++++++++++- sys/dev/usb/makemap.awk | 13 +++++---- 4 files changed, 88 insertions(+), 13 deletions(-) diff --git a/share/man/man4/pckbd.4 b/share/man/man4/pckbd.4 index f3f6dc68975..4ba374dd0d0 100644 --- a/share/man/man4/pckbd.4 +++ b/share/man/man4/pckbd.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pckbd.4,v 1.35 2008/07/16 16:32:06 miod Exp $ +.\" $OpenBSD: pckbd.4,v 1.36 2008/08/09 16:31:06 miod Exp $ .\" $NetBSD: pckbd.4,v 1.3 1999/12/21 11:31:07 drochner Exp $ .\" .\" Copyright (c) 1999 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: July 16 2008 $ +.Dd $Mdocdate: August 9 2008 $ .Dt PCKBD 4 .Os .Sh NAME @@ -84,6 +84,11 @@ Spanish. .It KB_FR .Pq fr French. +.It KB_FR | KB_DVORAK +.Pq fr.dvorak +French keyboard with +.Dq Dvorak-Bepo +layout. .It KB_HU .Pq hu Hungarian. @@ -171,7 +176,8 @@ variant. This switches off the .Dq dead accents . .Pp -The KB_BE, KB_FR, KB_JP, KB_US and KB_US | KB_DVORAK mappings can be modified +The KB_BE, KB_FR, KB_FR | KB_DVORAK, KB_JP, KB_US and KB_US | KB_DVORAK +mappings can be modified to swap the left Control and the Caps Lock keys by the KB_SWAPCTRLCAPS variant bit or the .Dq .swapctrlcaps diff --git a/share/man/man4/ukbd.4 b/share/man/man4/ukbd.4 index ea434c300b3..8cad3359bf5 100644 --- a/share/man/man4/ukbd.4 +++ b/share/man/man4/ukbd.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ukbd.4,v 1.16 2008/06/26 05:42:07 ray Exp $ +.\" $OpenBSD: ukbd.4,v 1.17 2008/08/09 16:31:06 miod Exp $ .\" $NetBSD: ukbd.4,v 1.10 2001/12/29 15:12:32 augustss Exp $ .\" .\" Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: June 26 2008 $ +.Dd $Mdocdate: August 9 2008 $ .Dt UKBD 4 .Os .Sh NAME @@ -115,6 +115,11 @@ French. French for .Tn Apple black USB keyboards. +.It KB_FR | KB_DVORAK +.Pq fr.dvorak +French keyboard with +.Dq Dvorak-Bepo +layout. .It KB_HU .Pq hu Hungarian. @@ -203,7 +208,8 @@ variant. This switches off the .Dq dead accents . .Pp -The KB_BE, KB_FR, KB_FR | KB_APPLE, KB_JP, KB_US and KB_US | KB_DVORAK +The KB_BE, KB_FR, KB_FR | KB_APPLE, KB_FR | KB_DVORAK, KB_JP, KB_US and +KB_US | KB_DVORAK mappings can be modified to swap the left Control and the Caps Lock keys by the KB_SWAPCTRLCAPS variant bit or the diff --git a/sys/dev/pckbc/wskbdmap_mfii.c b/sys/dev/pckbc/wskbdmap_mfii.c index e07afaa2216..34baaa678ea 100644 --- a/sys/dev/pckbc/wskbdmap_mfii.c +++ b/sys/dev/pckbc/wskbdmap_mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbdmap_mfii.c,v 1.38 2008/07/30 15:53:31 deraadt Exp $ */ +/* $OpenBSD: wskbdmap_mfii.c,v 1.39 2008/08/09 16:31:08 miod Exp $ */ /* $NetBSD: wskbdmap_mfii.c,v 1.15 2000/05/19 16:40:04 drochner Exp $ */ /* @@ -291,6 +291,65 @@ static const keysym_t pckbd_keydesc_fr[] = { KC(184), KS_Mode_switch, KS_Multi_key, }; +/* + * fr-dvorak-be'po layout, simplified map, per http://www.clavier-dvorak.org/ + * (the complete map is still a moving target) + */ +static const keysym_t pckbd_keydesc_fr_dvorak_bepo[] = { + KC(2), KS_quotedbl, KS_1, KS_hyphen, + KC(3), KS_guillemotleft, KS_2, KS_less, + KC(4), KS_guillemotright, KS_3, KS_greater, + KC(5), KS_parenleft, KS_4, KS_bracketleft, + KC(6), KS_parenright, KS_5, KS_bracketright, + KC(7), KS_at, KS_6, + KC(8), KS_plus, KS_7, + KC(9), KS_minus, KS_8, + KC(10), KS_slash, KS_9, + KC(11), KS_asterisk, KS_0, + KC(12), KS_equal, KS_asciicircum, + KC(13), KS_percent, KS_grave, + KC(16), KS_b, KS_B, KS_bar, + KC(17), KS_eacute, KS_Eacute, KS_dead_acute, + KC(18), KS_p, KS_P, KS_ampersand, + KC(19), KS_o, KS_O, + /* oe ligature */ + KC(20), KS_egrave, KS_Egrave, KS_dead_grave, + KC(21), KS_dead_circumflex,KS_exclam, + KC(22), KS_v, + KC(23), KS_d, + KC(24), KS_l, + KC(25), KS_j, + KC(26), KS_z, + KC(27), KS_w, + KC(30), KS_a, KS_A, KS_ae, KS_AE, + KC(31), KS_u, KS_U, KS_ugrave, KS_Ugrave, + KC(32), KS_i, KS_I, KS_dead_diaeresis, + KC(33), KS_e, KS_E, + /* euro currency */ + KC(34), KS_comma, KS_semicolon, + KC(35), KS_c, + KC(36), KS_t, + KC(37), KS_s, + KC(38), KS_r, + KC(39), KS_n, + KC(40), KS_m, + KC(41), KS_dollar, KS_numbersign, + KC(43), KS_ccedilla, KS_Ccedilla, + KC(44), KS_agrave, KS_Agrave, KS_backslash, + KC(45), KS_y, KS_Y, KS_braceleft, + KC(46), KS_x, KS_X, KS_braceright, + KC(47), KS_period, KS_colon, /* ellipsis */ + KC(48), KS_k, KS_K, KS_asciitilde, + KC(49), KS_apostrophe, KS_question, + KC(50), KS_q, KS_Q, + KC(51), KS_g, KS_G, KS_mu, + KC(52), KS_h, + KC(53), KS_f, + KC(57), KS_space, KS_nobreakspace,KS_underscore, + KC(86), KS_egrave, KS_Egrave, KS_slash, + KC(184), KS_Mode_switch, KS_Multi_key, +}; + static const keysym_t pckbd_keydesc_it[] = { /* pos normal shifted altgr shift-altgr */ KC(3), KS_2, KS_quotedbl, KS_twosuperior, @@ -980,6 +1039,7 @@ const struct wscons_keydesc pckbd_keydesctab[] = { KBD_MAP(KB_DE, KB_US, pckbd_keydesc_de), KBD_MAP(KB_DE | KB_NODEAD, KB_DE, pckbd_keydesc_de_nodead), KBD_MAP(KB_FR, KB_US, pckbd_keydesc_fr), + KBD_MAP(KB_FR | KB_DVORAK, KB_US, pckbd_keydesc_fr_dvorak_bepo), KBD_MAP(KB_DK, KB_US, pckbd_keydesc_dk), KBD_MAP(KB_DK | KB_NODEAD, KB_DK, pckbd_keydesc_dk_nodead), KBD_MAP(KB_IT, KB_US, pckbd_keydesc_it), @@ -995,6 +1055,8 @@ const struct wscons_keydesc pckbd_keydesctab[] = { KBD_MAP(KB_US | KB_IOPENER, KB_US, pckbd_keydesc_iopener), KBD_MAP(KB_JP | KB_SWAPCTRLCAPS, KB_JP, pckbd_keydesc_swapctrlcaps), KBD_MAP(KB_FR | KB_SWAPCTRLCAPS, KB_FR, pckbd_keydesc_swapctrlcaps), + KBD_MAP(KB_FR | KB_DVORAK | KB_SWAPCTRLCAPS, KB_FR | KB_DVORAK, + pckbd_keydesc_swapctrlcaps), KBD_MAP(KB_BE | KB_SWAPCTRLCAPS, KB_BE, pckbd_keydesc_swapctrlcaps), KBD_MAP(KB_US | KB_DVORAK | KB_SWAPCTRLCAPS, KB_US | KB_DVORAK, pckbd_keydesc_swapctrlcaps), diff --git a/sys/dev/usb/makemap.awk b/sys/dev/usb/makemap.awk index 9626bf44e62..324c6f639f4 100644 --- a/sys/dev/usb/makemap.awk +++ b/sys/dev/usb/makemap.awk @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $OpenBSD: makemap.awk,v 1.8 2008/05/19 18:09:06 miod Exp $ +# $OpenBSD: makemap.awk,v 1.9 2008/08/09 16:31:08 miod Exp $ # # Copyright (c) 2005, Miodrag Vallat # @@ -31,7 +31,7 @@ # BEGIN { - rcsid = "$OpenBSD: makemap.awk,v 1.8 2008/05/19 18:09:06 miod Exp $" + rcsid = "$OpenBSD: makemap.awk,v 1.9 2008/08/09 16:31:08 miod Exp $" ifdepth = 0 ignore = 0 declk = 0 @@ -39,8 +39,7 @@ BEGIN { kbfr = 0 nmaps = 0 - # PS/2 id -> UKBD conversion table, or "sanity lossage 102" - # (101 is for GSC keyboards!) + # PS/2 id -> UKBD conversion table, or "sanity lossage 101" for (i = 0; i < 256; i++) conv[i] = -1 @@ -398,9 +397,11 @@ $1 == "#define" || $1 == "#undef" { } /KB_FR/ { print $0 - if (kbfr++ == 0) { + kbfr++ + # Add .apple variants, but not to the fr.dvorak variants + if (kbfr == 1) { print "\tKBD_MAP(KB_FR | KB_APPLE,\tKB_FR,\tukbd_keydesc_fr_apple)," - } else { + } else if (kbfr == 3) { print "\tKBD_MAP(KB_FR | KB_APPLE | KB_SWAPCTRLCAPS,\tKB_FR | KB_APPLE," print "\t\tukbd_keydesc_swapctrlcaps)," } -- cgit v1.2.3