> I wasn't surprised to find out that Romanian keyboard layout is not
> supported by default OpenBSD installation.
Well, quoting pckbd(4): ``The list of built-in mappings doesn't follow
any logic. It grew as people submitted what they needed.''
It looks like you are the first person to dare asking for a romanian
keyboard layout.
> Now, the last two characters (0x0219 and 0x021A) are tricky, they
> should be s-comma and t-comma, not to be mistaken with s-cedilla and
> t-cedilla. The cedilla variants are supported in
> /usr/include/dev/wscons/wsksymdef.h, but I couldn't find the "comma"
> ones.
Err, aren't your commas ogoneks, by chance? wscons is already a PITA
calling haceks `carons' (yes, I know this is legit, but it is just the
wrong name), please don't add any more confusion in there (-:
> Is there a way to remap may keyboard so that I can use all the five
> special characters (plus their corresponding uppercase variants)
> mentioned above? I did read the FAQ (section 7.1) and the wsconsctl
> help page, but the examples listed there did not helped me much in
> this particular scenario.
Yes, this can be done with wsconsctl. But - pardon me - I am too lazy to
give this a try, so here is a diff to add a romanian keyboard layout to
the kernel. If you have an usb keyboard, you'll need to run `make' in
sys/dev/usb after applying the diff. Also, you'll need to copy
wsksymdef.h to /usr/include/dev/wscons and rebuild /sbin/wsconsctl and
/sbin/kbd to be able to use `ro' as a keyboard layout.
Miod
Index: sys/dev/pckbc/wskbdmap_mfii.c
===================================================================
RCS file: /cvs/src/sys/dev/pckbc/wskbdmap_mfii.c,v
retrieving revision 1.42
diff -u -p -r1.42 wskbdmap_mfii.c
--- sys/dev/pckbc/wskbdmap_mfii.c 5 Apr 2011 19:12:13 -0000 1.42
+++ sys/dev/pckbc/wskbdmap_mfii.c 5 Jul 2012 18:39:54 -0000
@@ -1059,6 +1059,41 @@ static const keysym_t pckbd_keydesc_is_n
KC(40), KS_acute, KS_diaeresis, KS_asciicircum,
};
+static const keysym_t pckbd_keydesc_ro[] = {
+ KC(2), KS_1, KS_exclam, KS_asciitilde,
+ KC(3), KS_2, KS_at, 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_asciicircum, KS_L2_ogonek,
+ KC(8), KS_7, KS_ampersand, KS_grave,
+ KC(9), KS_8, KS_asterisk, KS_L2_dotabove,
+ KC(10), KS_9, KS_parenleft, KS_apostrophe,
+ KC(11), KS_0, KS_parenright, KS_L2_dblacute,
+ KC(12), KS_minus, KS_underscore, KS_quotedbl,
+ KC(13), KS_equal, KS_plus, KS_cedilla,
+ KC(26), KS_L2_abreve, KS_L2_Abreve,
+ KS_bracketleft, KS_braceleft,
+ KC(27), KS_icircumflex, KS_Icircumflex,
+ KS_bracketright, KS_braceright,
+ KC(31), KS_s, KS_S, KS_ssharp,
+ KC(32), KS_d, KS_D,
+ KS_eth, KS_ETH,
+ KC(38), KS_l, KS_L,
+ KS_L2_lstroke, KS_L2_Lstroke,
+ KC(39), KS_L2_scedilla, KS_L2_Scedilla,
+ KS_semicolon, KS_colon,
+ KC(40), KS_L2_tcedilla, KS_L2_Tcedilla,
+ KS_apostrophe, KS_quotedbl,
+ KC(43), KS_acircumflex, KS_Acircumflex,
+ KS_backslash, KS_bar,
+ KC(51), KS_comma, KS_semicolon,
+ KS_less, KS_guillemotleft,
+ KC(52), KS_period, KS_colon,
+ KS_greater, KS_guillemotright,
+ KC(184), KS_Mode_switch, KS_Multi_key,
+};
+
#endif /* WSKBD_NO_INTL_LAYOUTS */
#define KBD_MAP(name, base, map) \
@@ -1118,6 +1153,7 @@ const struct wscons_keydesc pckbd_keydes
KBD_MAP(KB_NL | KB_NODEAD, KB_NL, pckbd_keydesc_nl_nodead),
KBD_MAP(KB_IS, KB_US, pckbd_keydesc_is),
KBD_MAP(KB_IS | KB_NODEAD, KB_IS, pckbd_keydesc_is_nodead),
+ KBD_MAP(KB_RO, KB_US, pckbd_keydesc_ro),
#endif /* WSKBD_NO_INTL_LAYOUTS */
{0, 0, 0, 0}
};
Index: sys/dev/wscons/wsksymdef.h
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wsksymdef.h,v
retrieving revision 1.34
diff -u -p -r1.34 wsksymdef.h
--- sys/dev/wscons/wsksymdef.h 5 Apr 2011 19:12:13 -0000 1.34
+++ sys/dev/wscons/wsksymdef.h 5 Jul 2012 18:39:55 -0000
@@ -734,6 +734,7 @@
#define KB_CF 0x1a00
#define KB_LV 0x1b00
#define KB_IS 0x1c00
+#define KB_RO 0x1d00
#define KB_NODEAD 0x000001 /* disable dead accents */
#define KB_DECLK 0x000002 /* DEC LKnnn layout */
@@ -773,7 +774,8 @@
{ KB_SI, "si" }, \
{ KB_CF, "cf" }, \
{ KB_LV, "lv" }, \
- { KB_IS, "is" }
+ { KB_IS, "is" }, \
+ { KB_RO, "ro" }
#define KB_VARTAB \
{ KB_NODEAD, "nodead" }, \