Module Name:    src
Committed By:   maya
Date:           Mon Feb 19 14:34:17 UTC 2018

Modified Files:
        src/sys/dev/pckbport: wskbdmap_mfii.c
        src/sys/dev/wscons: wsksymdef.h

Log Message:
Add Turkish keyboard layout.

from berte in PR kern/53011.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pckbport/wskbdmap_mfii.c
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/wscons/wsksymdef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pckbport/wskbdmap_mfii.c
diff -u src/sys/dev/pckbport/wskbdmap_mfii.c:1.25 src/sys/dev/pckbport/wskbdmap_mfii.c:1.26
--- src/sys/dev/pckbport/wskbdmap_mfii.c:1.25	Mon Jul 14 10:05:24 2014
+++ src/sys/dev/pckbport/wskbdmap_mfii.c	Mon Feb 19 14:34:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: wskbdmap_mfii.c,v 1.25 2014/07/14 10:05:24 mbalmer Exp $	*/
+/*	$NetBSD: wskbdmap_mfii.c,v 1.26 2018/02/19 14:34:17 maya Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.25 2014/07/14 10:05:24 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.26 2018/02/19 14:34:17 maya Exp $");
 
 #include "opt_wskbdmap.h"
 #include <sys/types.h>
@@ -771,6 +771,41 @@ static const keysym_t pckbd_keydesc_us_c
     KC(184), KS_Mode_switch,	KS_Multi_key,
 };
 
+static const keysym_t pckbd_keydesc_tr[] = {
+/*  pos      normal		shifted         altgr           shift-altgr */
+    KC(3),   KS_2,		KS_apostrophe,	KS_sterling,
+    KC(4),   KS_3,		KS_asciicircum,	KS_numbersign,
+    KC(5),   KS_4,		KS_plus,	KS_dollar,
+    KC(6),   KS_5,		KS_percent,	KS_onehalf,
+    KC(7),   KS_6,		KS_ampersand,
+    KC(8),   KS_7,		KS_slash,	KS_braceleft,
+    KC(9),   KS_8,		KS_parenleft,	KS_bracketleft,
+    KC(10),  KS_9,		KS_parenright,	KS_bracketright,
+    KC(11),  KS_0,		KS_equal,	KS_braceright,
+    KC(12),  KS_asterisk,	KS_question,	KS_backslash,
+    KC(13),  KS_minus,		KS_underscore,
+    KC(16),  KS_q,		KS_Q,		KS_at,
+    KC(23),  KS_L5_idotless,	KS_I,
+    KC(26),  KS_L5_gbreve,	KS_L5_Gbreve,	KS_dead_diaeresis,
+    KC(27),  KS_udiaeresis,	KS_Udiaeresis,	KS_asciitilde,
+    KC(39),  KS_L5_scedilla,	KS_L5_Scedilla,	KS_dead_acute,
+    KC(40),  KS_i,		KS_L5_Idotabove,
+    KC(41),  KS_quotedbl,	KS_eacute,
+    KC(43),  KS_comma,		KS_semicolon,	KS_dead_grave,
+    KC(51),  KS_odiaeresis,	KS_Odiaeresis,
+    KC(52),  KS_ccedilla,	KS_Ccedilla,
+    KC(53),  KS_period,	KS_colon,
+    KC(86),  KS_less,		KS_greater,	KS_bar,
+    KC(184), KS_Mode_switch,	KS_Multi_key,
+};
+
+static const keysym_t pckbd_keydesc_tr_nodead[] = {
+/*  pos      normal		shifted         altgr           shift-altgr */
+    KC(26),  KS_L5_gbreve,	KS_L5_Gbreve,
+    KC(39),  KS_L5_scedilla,	KS_L5_Scedilla,	KS_apostrophe,
+    KC(43),  KS_comma,		KS_semicolon,	KS_grave,
+};
+
 static const keysym_t pckbd_keydesc_swapctrlcaps[] = {
 /*  pos      command		normal		shifted */
     KC(29), 			KS_Caps_Lock,
@@ -838,6 +873,8 @@ const struct wscons_keydesc pckbd_keydes
 	KBD_MAP(KB_HU,			KB_US,	pckbd_keydesc_hu),
 	KBD_MAP(KB_NL,			KB_US,	pckbd_keydesc_nl),
 	KBD_MAP(KB_NL | KB_NODEAD,	KB_NL,	pckbd_keydesc_nl_nodead),
+	KBD_MAP(KB_TR,			KB_US,	pckbd_keydesc_tr),
+	KBD_MAP(KB_TR | KB_NODEAD,	KB_TR,	pckbd_keydesc_tr_nodead),
 #endif /* WSKBD_USONLY */
 
 	/* placeholders */

Index: src/sys/dev/wscons/wsksymdef.h
diff -u src/sys/dev/wscons/wsksymdef.h:1.66 src/sys/dev/wscons/wsksymdef.h:1.67
--- src/sys/dev/wscons/wsksymdef.h:1.66	Sun Apr 22 14:32:08 2012
+++ src/sys/dev/wscons/wsksymdef.h	Mon Feb 19 14:34:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsksymdef.h,v 1.66 2012/04/22 14:32:08 khorben Exp $ */
+/*	$NetBSD: wsksymdef.h,v 1.67 2018/02/19 14:34:17 maya Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -590,6 +590,18 @@
 
 #define KS_voidSymbol		0xf500
 
+
+/*
+ * Group Latin-5 (iso8859-9)
+ */
+
+#define KS_L5_Gbreve		0xd0
+#define KS_L5_Idotabove		0xdd
+#define KS_L5_Scedilla		0xde
+#define KS_L5_gbreve		0xf0
+#define KS_L5_idotless		0xfd
+#define KS_L5_scedilla		0xfe
+
 /*ENDKEYSYMDECL*/
 
 /*
@@ -661,12 +673,13 @@ action(KB_ES,	0,	0x0b00,	"es",	,	"Spanis
 action(KB_SV,	0,	0x0900,	"sv",	,	"Swedish")	\
 action(KB_SF,	0,	0x1000,	"sf",	,	"Swiss French")	\
 action(KB_SG,	0,	0x0f00,	"sg",	,	"Swiss German")	\
+action(KB_TR,	0,	0x1700,	"tr",	,	"Turkish")	\
 action(KB_UA,	0,	0x1200,	"ua",	,	"Ukrainian")	
 #define KB_NONE 0x0000
 
 /* Define all the KB_xx numeric values using above table */
 #define KBF_ENUM(tag, tagf, value, cc, ccf, country) tag=value,
-enum { KB_ENC_FUN(KBF_ENUM) KB_NEXT=0x1700 };
+enum { KB_ENC_FUN(KBF_ENUM) KB_NEXT=0x1800 };
 
 /* Define list of KB_xxx and country codes for array initialisation */
 #define KBF_ENCTAB(tag, tagf, value, cc, ccf, country) { tag, cc },

Reply via email to