diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-11-26 16:53:01 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-11-26 16:53:01 +0000 |
commit | 5526bf49a128c7090b38fa63def594a69d7b34e9 (patch) | |
tree | ab6731361a00ce6aac5444bc157209eaebe63aee | |
parent | 64060aafbde7f0155846772781683daae00e095c (diff) |
Add a nasty little hack to make keyboard selection work for Swiss keyboard
encodings and the Canadian French one. The way XkbLayout and XkbVariant
work for this encodings changed some long time ago and the result was
that you would end up with no keyboard at all in X. Now XkbVariant includes
part of the layout selection which is about as ugly and makes the wscons
mapping a bit tricky.
OK matthieu@, maja@
-rw-r--r-- | driver/xf86-input-keyboard/src/bsd_kbd.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/driver/xf86-input-keyboard/src/bsd_kbd.c b/driver/xf86-input-keyboard/src/bsd_kbd.c index c59c4a12d..0e993dfd6 100644 --- a/driver/xf86-input-keyboard/src/bsd_kbd.c +++ b/driver/xf86-input-keyboard/src/bsd_kbd.c @@ -35,10 +35,10 @@ #define KB_OVRENC \ { KB_UK, "gb" }, \ { KB_SV, "se" }, \ - { KB_SG, "ch(de)" }, \ - { KB_SF, "ch(fr)" }, \ + { KB_SG, "ch" }, \ + { KB_SF, "ch" }, \ { KB_LA, "latam" }, \ - { KB_CF, "ca(fr)" } + { KB_CF, "ca" } struct nameint { int val; @@ -46,8 +46,13 @@ struct nameint { } kbdenc[] = { KB_OVRENC, KB_ENCTAB, { 0 } }; struct nameint kbdvar[] = { - { KB_NODEAD, "nodeadkeys" }, - { KB_DVORAK, "dvorak" }, + { KB_NODEAD | KB_SG, "de_nodeadkeys" }, + { KB_NODEAD | KB_SF, "fr_nodeadkeys" }, + { KB_SF, "fr" }, + { KB_DVORAK | KB_CF, "fr-dvorak" }, + { KB_CF, "fr-legacy" }, + { KB_NODEAD, "nodeadkeys" }, + { KB_DVORAK, "dvorak" }, { 0 } }; @@ -524,7 +529,8 @@ OpenKeyboard(InputInfoPtr pInfo) } if (xf86findOption(pInfo->options, "XkbVariant") == NULL) for (i = 0; kbdvar[i].val; i++) - if (KB_VARIANT(wsenc) == kbdvar[i].val) { + if (wsenc == kbdvar[i].val || + KB_VARIANT(wsenc) == kbdvar[i].val) { xf86Msg(X_PROBED, "%s: using wscons variant %s\n", pInfo->name, kbdvar[i].name); xf86addNewOption(pInfo->options, "XkbVariant", kbdvar[i].name); |