Subject: kern/29615: Added support for Slovenian keymap
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <jkovacic@gmail.com>
List: netbsd-bugs
Date: 03/07/2005 06:49:00
>Number:         29615
>Category:       kern
>Synopsis:       Added support for Slovenian keymap
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 07 06:49:00 +0000 2005
>Originator:     Jernej Kovacic
>Release:        2.0-release
>Organization:
>Environment:
>Description:
Slovenian keymap was not supported
>How-To-Repeat:

>Fix:
Now I have finally installed NetBSD, so my previous PR 24925, based on my OpenBSD experience, should be replaced by this one, which works at my system.

The following two files should be modified:
/usr/src/sys/dev/pckbport/wskbdmap_mfii.c and
/usr/src/sys/dev/wscons/wsksymdef.h

The following array must be placed into wskbdmap_mfii.c:

static const keysym_t pckbd_keydesc_si[] = {
/*  pos		normal		shift		altgr  */
    KC(2),	KS_1,		KS_exclam,	KS_asciitilde,
    KC(3),	KS_2,		KS_quotedbl,	KS_L2_caron,
    KC(4),	KS_3,		KS_numbersign,	KS_asciicircum,
    KC(5),	KS_4,		KS_dollar,	KS_L2_breve,
    KC(6),	KS_5,		KS_percent,	KS_degree,
    KC(7),	KS_6,		KS_ampersand,	KS_L2_ogonek,
    KC(8),	KS_7,		KS_slash,	KS_grave,
    KC(9),	KS_8,		KS_parenleft,	KS_L2_dotabove,
    KC(10),	KS_9,		KS_parenright,	KS_acute,
    KC(11),	KS_0,		KS_equal,	KS_L2_dblacute,
    KC(12),	KS_apostrophe,	KS_question,	KS_diaeresis,
    KC(13),	KS_plus,	KS_asterisk,	KS_cedilla,
    KC(16),	KS_q,		KS_Q,		KS_backslash,
    KC(17),	KS_w,		KS_W,		KS_bar,
    KC(21),	KS_z,		KS_Z,
    KC(26),	KS_L2_scaron,	KS_L2_Scaron,	KS_division,
    KC(27),	KS_L2_dstroke,	KS_L2_Dstroke,	KS_multiply,
    KC(33),	KS_f,		KS_F,		KS_bracketleft,
    KC(34),	KS_g,		KS_G,		KS_bracketright,
    KC(37),	KS_k,		KS_K,		KS_L2_lstroke,
    KC(38),	KS_l,		KS_L,		KS_L2_Lstroke,
    KC(39),	KS_L2_ccaron,	KS_L2_Ccaron,
    KC(40),	KS_L2_cacute,	KS_L2_Cacute,	KS_ssharp,
    KC(41),	KS_cedilla,	KS_diaeresis,
    KC(43),	KS_L2_zcaron,	KS_L2_Zcaron,	KS_currency,
    KC(44),	KS_y,		KS_Y,
    KC(47),	KS_v,		KS_V,		KS_at,
    KC(48),	KS_b,		KS_B,		KS_braceleft,
    KC(49),	KS_n,		KS_N,		KS_braceright,
    KC(50),	KS_m,		KS_M,		KS_section,
    KC(51),	KS_comma,	KS_semicolon,
    KC(52),	KS_period,	KS_colon,
    KC(53),	KS_minus,	KS_underscore,
    KC(86),	KS_less,	KS_greater,
    KC(184),	KS_Mode_switch,	KS_Multi_key,
};

and the following line should be added into the array
const struct wscons_keydesc pckbd_keydesctab[]
inside the same file:

KBD_MAP(KB_SI,			KB_US,	pckbd_keydesc_si),


Into wsksymdef.h, first add the following definitions of central European characters (part of ISO8859-2, here encoded in Unicode):

/*
 * Group Latin-2 (characters from iso8859-2, encoded in Unicode (UCS-2))
*/

#define KS_L2_Lstroke		0x0141
#define KS_L2_lstroke		0x0142
#define KS_L2_Cacute		0x0106
#define KS_L2_cacute		0x0107
#define KS_L2_Ccaron		0x010c
#define KS_L2_ccaron		0x010d
#define KS_L2_Scaron		0x0160
#define KS_L2_scaron		0x0161
#define KS_L2_Zcaron		0x017d
#define KS_L2_zcaron		0x017e
#define KS_L2_Dstroke		0x0110
#define KS_L2_dstroke		0x0111
#define KS_L2_caron		0x02c7
#define KS_L2_breve		0x02d8
#define KS_L2_ogonek		0x02db
#define KS_L2_dotabove		0x02d9
#define KS_L2_dblacute		0x02dd


then #define an entry for Slovenian keymap:

#define KB_SI			0x1400   /* Slovenian keymap, useful in most parts of the former Yugoslavia */



and finally add the following line into the definition of #define KB_ENCTAB:

	{ KB_SI,	"si" }

(don't forget to add a backslash ('\') after the definiton of Belgian keymap)

Should you have any further questions, do not hesitate to email me.