I am playing on my Macboo Pro (Typ A1286, a Feb 2012 model, Swiss keyboard
layout), which appears as "Macbbok Pro 8.2" in OpenBSD52 GENERIC.
It works ok when choosing GERMAN keyboard layout... but the special chars are
wrong.
I managed to get the keys arranged to fit the "right" layout. See diffs below
against the original files of OpenBSD 5.2 release.
I managed to get to stable, then did the changes in wskbdmap_mfii.c, then
awk -f makemap.awk ../pckbc/wskbdmap_mfii.c > ukbdmap.c
and recompiled the kernel and userland. Works fine.
Now the tricky part:
The system is an Apple Macbook Pro. I saw things like "fr.apple" already. I
might do a "ch.apple"... but Swiss keyboards come in "two" flavours: German and
French.
There are some 3-5 keys different, depending on the language.
Is "ch-de.apple" and ch-fr.apple" a good proposal to go forward ? It has 5
characters, instead of 2 ...
This would also require two times the layout in the wskbdmap_mfii.c file (and
increase further the kernel size).
How would this be implemented ? Similiar to the DVORAK types ?
(as in this: KBD_MAP(KB_FR | KB_DVORAK, KB_US,
pckbd_keydesc_fr_dvorak_bepo), ...)
the diffs:
diff wsksymdef_h.52 /usr/src/sys/dev/wscons/wsksymdef.h
736a737
> #define KB_CH 0x1d00
776c777,778
< { KB_IS, "is" }
---
> { KB_IS, "is" }, \
> { KB_CH, "ch" }
diff wskbdmap_mfii_c.52 /usr/src/sys/dev/pckbc/wskbdmap_mfii.c
1061a1062,1088
> static const keysym_t pckbd_keydesc_ch[] = {
> /* pos normal shifted altgr shift-altgr */
> KC(2), KS_1, KS_plus, KS_bar, KS_brokenbar,
> KC(3), KS_2, KS_quotedbl, KS_at,
> KC(4), KS_3, KS_asterisk, KS_numbersign,
> KC(5), KS_4, KS_ccedilla,
> KC(6), KS_5, KS_percent, KS_bracketleft,
> KC(7), KS_6, KS_ampersand, KS_bracketright,
> KC(8), KS_7, KS_slash, KS_brokenbar,
> KC(9), KS_8, KS_parenleft, KS_braceleft,
> KC(10), KS_9, KS_parenright, KS_braceright,
> KC(11), KS_0, KS_equal,
> KC(12), KS_dead_acute, KS_question, KS_apostrophe,
> KC(13), KS_dead_circumflex, KS_dead_grave, KS_dead_tilde,
> KC(16), KS_q, KS_Q, KS_at,
> KC(26), KS_udiaeresis, KS_egrave, KS_bracketleft,
> KC(27), KS_dead_diaeresis, KS_exclam, KS_bracketright,
> KC(31), KS_s, KS_S, KS_ssharp,
> KC(34), KS_g, KS_G, KS_at,
> KC(38), KS_l, KS_L, KS_at,
> KC(39), KS_odiaeresis, KS_eacute,
> KC(40), KS_adiaeresis, KS_agrave, KS_braceleft,
> KC(41), KS_paragraph, KS_dead_abovering,
> KC(43), KS_dollar, KS_sterling, KS_braceright,
> KC(86), KS_less, KS_greater, KS_backslash,
> };
>
1120a1148
> KBD_MAP(KB_CH, KB_DE, pckbd_keydesc_ch),