From 329167638ffe05116d699503dd7f5b4c2cc9b021 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 29 Nov 2002 01:00:52 +0000 Subject: Upon detection of an international Sun keyboard with a recognized layout, attach it with the appropriate keymap table, rather than the default KB_US table. If this is not the expected behaviour, users can still revert to US layout via "kbd us" or "wsconsctl -w keyboard.encoding=us". As the installation media uses the prom console, which will honor the international keyboard layout, this will definitely help users with international keyboards and fancy characters in their passwords... Note that there is still some Sun keyboard tables missing at the moment. --- sys/arch/sparc/dev/z8530kbd.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sys/arch/sparc/dev') diff --git a/sys/arch/sparc/dev/z8530kbd.c b/sys/arch/sparc/dev/z8530kbd.c index 82ddc738c63..4131cfb1ed5 100644 --- a/sys/arch/sparc/dev/z8530kbd.c +++ b/sys/arch/sparc/dev/z8530kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530kbd.c,v 1.1 2002/08/12 10:44:04 miod Exp $ */ +/* $OpenBSD: z8530kbd.c,v 1.2 2002/11/29 01:00:46 miod Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -425,11 +425,23 @@ zskbd_attach(parent, self, aux) if (ISTYPE5(zst->zst_layout)) { printf(": keyboard, type 5, layout 0x%x", zst->zst_layout); a.keymap = &sunkbd5_keymapdata; +#ifndef SUNKBD5_LAYOUT + if (zst->zst_layout < MAXSUNLAYOUT && + sunkbd_layouts[zst->zst_layout] != -1) + sunkbd5_keymapdata.layout = + sunkbd_layouts[zst->zst_layout]; +#endif } else { printf(": keyboard, type %d", zst->zst_id); if (zst->zst_id >= KB_SUN4) printf(", layout 0x%x", zst->zst_layout); a.keymap = &sunkbd_keymapdata; +#ifndef SUNKBD_LAYOUT + if (zst->zst_layout < MAXSUNLAYOUT && + sunkbd_layouts[zst->zst_layout] != -1) + sunkbd_keymapdata.layout = + sunkbd_layouts[zst->zst_layout]; +#endif } a.accessops = &zskbd_accessops; a.accesscookie = zst; -- cgit v1.2.3