diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-07-16 16:32:09 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-07-16 16:32:09 +0000 |
commit | adb90c171c4675d893a66c5c4a280844643027c6 (patch) | |
tree | 28da3eb37d14937355603098e136e6075b020cd5 /sys | |
parent | c40ff5a74813ffe5a9ab781208841060e795c4c4 (diff) |
Implement pckbc_xt_translation() in gsckbc. Thus, we can attach pckbd instead of
gsckbd; the former will cause a proper translation page to be selected by
the keyboard.
Because of this, we no longer depend on the page the keyboard is left in
by the PDC (page 2 for all machines but the PrecisionBook, which is in
page 3), and there is no longer any need to use separate keyboard maps.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hppa/conf/GENERIC | 6 | ||||
-rw-r--r-- | sys/arch/hppa/conf/RAMDISK | 6 | ||||
-rw-r--r-- | sys/arch/hppa/conf/files.hppa | 10 | ||||
-rw-r--r-- | sys/arch/hppa/gsc/Makefile | 10 | ||||
-rw-r--r-- | sys/arch/hppa/gsc/gsckbc.c | 19 | ||||
-rw-r--r-- | sys/arch/hppa/gsc/gsckbd.c | 602 | ||||
-rw-r--r-- | sys/arch/hppa/gsc/gsckbdmap.c | 1036 | ||||
-rw-r--r-- | sys/arch/hppa/gsc/gsckbdmap.h | 29 | ||||
-rw-r--r-- | sys/arch/hppa/gsc/gsckbdvar.h | 29 | ||||
-rw-r--r-- | sys/arch/hppa/gsc/makemap.awk | 359 |
10 files changed, 22 insertions, 2084 deletions
diff --git a/sys/arch/hppa/conf/GENERIC b/sys/arch/hppa/conf/GENERIC index 9aafa0b7b65..c990db0dd58 100644 --- a/sys/arch/hppa/conf/GENERIC +++ b/sys/arch/hppa/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.118 2008/06/07 19:12:32 brad Exp $ +# $OpenBSD: GENERIC,v 1.119 2008/07/16 16:32:08 miod Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -244,7 +244,7 @@ scsibus* at oosiop? harmony* at gsc? irq 13 # Audio Type 2 (CS4215/AD1849) audio* at harmony? gsckbc* at gsc? irq 26 -gsckbd* at gsckbc? # PS/2 keyboard +pckbd* at gsckbc? # PS/2 keyboard pms* at gsckbc? # PS/2 mouse #sh* at eisa? # Interphase Seahawk 4811 EISA/FDDI @@ -328,7 +328,7 @@ ukphy* at mii? # generic unknown PHYs # MI devices #wsdisplay* at vgafb? wsdisplay* at sti? -wskbd* at gsckbd? mux 1 +wskbd* at pckbd? mux 1 wskbd* at hilkbd? mux 1 wsmouse* at pms? mux 0 wsmouse* at hilms? mux 0 diff --git a/sys/arch/hppa/conf/RAMDISK b/sys/arch/hppa/conf/RAMDISK index 68530040623..c611a696e6d 100644 --- a/sys/arch/hppa/conf/RAMDISK +++ b/sys/arch/hppa/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.84 2008/07/02 03:00:03 brad Exp $ +# $OpenBSD: RAMDISK,v 1.85 2008/07/16 16:32:08 miod Exp $ # # Diskless kernel config # @@ -222,7 +222,7 @@ scsibus* at oosiop? #harmony* at gsc? irq 13 # Audio Type 2 (CS4215/AD1849) #audio* at harmony? gsckbc* at gsc? irq 26 -gsckbd* at gsckbc? # PS/2 keyboard +pckbd* at gsckbc? # PS/2 keyboard #pms* at gsckbc? # PS/2 mouse #sh* at eisa? # Interphase Seahawk 4811 EISA/FDDI @@ -306,7 +306,7 @@ ukphy* at mii? # generic unknown PHYs # MI devices #wsdisplay* at vgafb? wsdisplay* at sti? -wskbd* at gsckbd? mux 1 +wskbd* at pckbd? mux 1 wskbd* at hilkbd? mux 1 #wsmouse* at pms? mux 0 #wsmouse* at hilms? mux 0 diff --git a/sys/arch/hppa/conf/files.hppa b/sys/arch/hppa/conf/files.hppa index a2733fce72a..88d641f032d 100644 --- a/sys/arch/hppa/conf/files.hppa +++ b/sys/arch/hppa/conf/files.hppa @@ -1,4 +1,4 @@ -# $OpenBSD: files.hppa,v 1.79 2008/05/28 22:45:57 kettenis Exp $ +# $OpenBSD: files.hppa,v 1.80 2008/07/16 16:32:08 miod Exp $ # # hppa-specific configuration info @@ -284,13 +284,7 @@ device gsckbc: pckbcslot attach gsckbc at gsc file arch/hppa/gsc/gsckbc.c gsckbc -# PS/2 keyboard -device gsckbd: wskbddev -attach gsckbd at pckbcslot -file arch/hppa/gsc/gsckbd.c gsckbd needs-flag -file arch/hppa/gsc/gsckbdmap.c gsckbd - -# PS/2 mouse +# PS/2 keyboard and mouse include "dev/pckbc/files.pckbc" # diff --git a/sys/arch/hppa/gsc/Makefile b/sys/arch/hppa/gsc/Makefile deleted file mode 100644 index 0aa281730ee..00000000000 --- a/sys/arch/hppa/gsc/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $OpenBSD: Makefile,v 1.1 2003/02/16 01:42:49 miod Exp $ - -AWK= awk -PROG= makemap.awk - -SOURCE= ../../../dev/pckbc/wskbdmap_mfii.c - -gsckbdmap.c: ${SOURCE} ${PROG} - /bin/rm -f $@ - ${AWK} -f ${PROG} ${SOURCE} > $@ diff --git a/sys/arch/hppa/gsc/gsckbc.c b/sys/arch/hppa/gsc/gsckbc.c index 0f52af3ccfa..0ed5d9b220d 100644 --- a/sys/arch/hppa/gsc/gsckbc.c +++ b/sys/arch/hppa/gsc/gsckbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gsckbc.c,v 1.10 2007/10/01 16:11:19 krw Exp $ */ +/* $OpenBSD: gsckbc.c,v 1.11 2008/07/16 16:32:08 miod Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -88,7 +88,7 @@ #include <dev/ic/pckbcvar.h> #include <dev/pckbc/pckbdreg.h> /* constants for probe magic */ -#include <hppa/gsc/gsckbdvar.h> +#include <dev/pckbc/pckbdvar.h> int gsckbc_match(struct device *, void *, void *); void gsckbc_attach(struct device *, struct device *, void *); @@ -111,7 +111,7 @@ struct cfdriver gsckbc_cd = { void gsckbc_intr_establish(struct pckbc_softc *, pckbc_slot_t); -#include "gsckbd.h" +#include "pckbd.h" #if (NGSCKBD > 0) #include <dev/pckbc/pckbdvar.h> #endif @@ -411,11 +411,11 @@ gsckbc_attach(struct device *parent, struct device *self, void *aux) printf("%s: expecting device type %d, got %d\n", sc->sc_dv.dv_xname, gsc->sc_type, ident); } else { -#if (NGSCKBD > 0) +#if (NPCKBD > 0) if (gsc->sc_type == PCKBC_KBD_SLOT && ga->ga_dp.dp_mod == PAGE0->mem_kbd.pz_dp.dp_mod && bcmp(ga->ga_dp.dp_bc, PAGE0->mem_kbd.pz_dp.dp_bc, 6) == 0) - gsckbd_cnattach(t, PCKBC_KBD_SLOT); + pckbd_cnattach(t, PCKBC_KBD_SLOT); #endif pckbc_attach_slot(sc, gsc->sc_type); } @@ -590,6 +590,15 @@ pckbc_poll_data(self, slot) return (c); } +int +pckbc_xt_translation(self, slot, on) + pckbc_tag_t self; + pckbc_slot_t slot; + int on; +{ + return (0); +} + void pckbc_slot_enable(self, slot, on) pckbc_tag_t self; diff --git a/sys/arch/hppa/gsc/gsckbd.c b/sys/arch/hppa/gsc/gsckbd.c deleted file mode 100644 index 432584bdefb..00000000000 --- a/sys/arch/hppa/gsc/gsckbd.c +++ /dev/null @@ -1,602 +0,0 @@ -/* $OpenBSD: gsckbd.c,v 1.8 2008/06/26 05:42:10 ray Exp $ */ -/* - * Copyright (c) 2003, Miodrag Vallat. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* - * Derived from /sys/dev/pckbc/pckbd.c under the following terms: - * OpenBSD: pckbd.c,v 1.4 2002/03/14 01:27:00 millert Exp - * NetBSD: pckbd.c,v 1.24 2000/06/05 22:20:57 sommerfeld Exp - */ -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Charles M. Hannum. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz and Don Ahn. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)pccons.c 5.11 (Berkeley) 5/21/91 - */ - -/* - * A pckbd-like driver for the GSC keyboards found on various HP workstations. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/device.h> -#include <sys/malloc.h> -#include <sys/ioctl.h> - -#include <machine/bus.h> - -#include <dev/ic/pckbcvar.h> - -#include <dev/pckbc/pckbdreg.h> -#include <hppa/gsc/gsckbdvar.h> -#include <hppa/gsc/gsckbdmap.h> - -#include <dev/wscons/wsconsio.h> -#include <dev/wscons/wskbdvar.h> -#include <dev/wscons/wsksymdef.h> -#include <dev/wscons/wsksymvar.h> - -struct gsckbd_internal { - int t_isconsole; - pckbc_tag_t t_kbctag; - pckbc_slot_t t_kbcslot; - - int t_lastchar; - int t_extended; - int t_releasing; - int t_extended1; - - struct gsckbd_softc *t_sc; /* back pointer */ -}; - -struct gsckbd_softc { - struct device sc_dev; - - struct gsckbd_internal *id; - int sc_enabled; - - int sc_ledstate; - - struct device *sc_wskbddev; -#ifdef WSDISPLAY_COMPAT_RAWKBD - int rawkbd; -#endif -}; - -int gsckbd_is_console(pckbc_tag_t, pckbc_slot_t); - -int gsckbdprobe(struct device *, void *, void *); -void gsckbdattach(struct device *, struct device *, void *); - -struct cfdriver gsckbd_cd = { - NULL, "gsckbd", DV_DULL -}; - -struct cfattach gsckbd_ca = { - sizeof(struct gsckbd_softc), gsckbdprobe, gsckbdattach, -}; - -int gsckbd_enable(void *, int); -void gsckbd_set_leds(void *, int); -int gsckbd_ioctl(void *, u_long, caddr_t, int, struct proc *); - -const struct wskbd_accessops gsckbd_accessops = { - gsckbd_enable, - gsckbd_set_leds, - gsckbd_ioctl, -}; - -void gsckbd_cngetc(void *, u_int *, int *); -void gsckbd_cnpollc(void *, int); - -const struct wskbd_consops gsckbd_consops = { - gsckbd_cngetc, - gsckbd_cnpollc, - NULL -}; - -const struct wskbd_mapdata gsckbd_keymapdata = { - gsckbd_keydesctab, /* XXX */ -#ifdef GSCKBD_LAYOUT - GSCKBD_LAYOUT, -#else - KB_US, -#endif -}; - -int gsckbd_init(struct gsckbd_internal *, pckbc_tag_t, pckbc_slot_t, - int); -void gsckbd_input(void *, int); - -static int gsckbd_decode(struct gsckbd_internal *, int, - u_int *, int *); -static int gsckbd_led_encode(int); -static int gsckbd_led_decode(int); - -struct gsckbd_internal gsckbd_consdata; - -int -gsckbd_is_console(tag, slot) - pckbc_tag_t tag; - pckbc_slot_t slot; -{ - return (gsckbd_consdata.t_isconsole && - (tag == gsckbd_consdata.t_kbctag) && - (slot == gsckbd_consdata.t_kbcslot)); -} - -/* - * these are both EXTREMELY bad jokes - */ -int -gsckbdprobe(parent, match, aux) - struct device *parent; - void *match; - void *aux; -{ - struct cfdata *cf = match; - struct pckbc_attach_args *pa = aux; - u_char cmd[1], resp[1]; - int res; - - /* - * XXX There are rumours that a keyboard can be connected - * to the aux port as well. For me, this didn't work. - * For further experiments, allow it if explicitly - * wired in the config file. - */ - if ((pa->pa_slot != PCKBC_KBD_SLOT) && - (cf->cf_loc[PCKBCCF_SLOT] == PCKBCCF_SLOT_DEFAULT)) - return (0); - - /* Flush any garbage. */ - pckbc_flush(pa->pa_tag, pa->pa_slot); - - /* Reset the keyboard. */ - cmd[0] = KBC_RESET; - res = pckbc_poll_cmd(pa->pa_tag, pa->pa_slot, cmd, 1, 1, resp, 1); - if (res) { -#ifdef DEBUG - printf("gsckbdprobe: reset error %d\n", res); -#endif - /* - * There is probably no keyboard connected. - * Let the probe succeed if the keyboard is used - * as console input - it can be connected later. - */ - return (gsckbd_is_console(pa->pa_tag, pa->pa_slot) ? 1 : 0); - } - if (resp[0] != KBR_RSTDONE) { - printf("gsckbdprobe: reset response 0x%x\n", resp[0]); - return (0); - } - - /* - * Some keyboards seem to leave a second ack byte after the reset. - * This is kind of stupid, but we account for them anyway by just - * flushing the buffer. - */ - pckbc_flush(pa->pa_tag, pa->pa_slot); - - return (2); -} - -void -gsckbdattach(parent, self, aux) - struct device *parent, *self; - void *aux; -{ - struct gsckbd_softc *sc = (void *)self; - struct pckbc_attach_args *pa = aux; - int isconsole; - struct wskbddev_attach_args a; - u_char cmd[1]; - - printf("\n"); - - isconsole = gsckbd_is_console(pa->pa_tag, pa->pa_slot); - - if (isconsole) { - sc->id = &gsckbd_consdata; - /* - * Some keyboards are not enabled after a reset, - * so make sure it is enabled now. - */ - cmd[0] = KBC_ENABLE; - (void) pckbc_poll_cmd(sc->id->t_kbctag, sc->id->t_kbcslot, - cmd, 1, 0, 0, 0); - sc->sc_enabled = 1; - } else { - sc->id = malloc(sizeof(struct gsckbd_internal), - M_DEVBUF, M_WAITOK); - (void) gsckbd_init(sc->id, pa->pa_tag, pa->pa_slot, 0); - - /* no interrupts until enabled */ - cmd[0] = KBC_DISABLE; - (void) pckbc_poll_cmd(sc->id->t_kbctag, sc->id->t_kbcslot, - cmd, 1, 0, 0, 0); - sc->sc_enabled = 0; - } - - sc->id->t_sc = sc; - - pckbc_set_inputhandler(sc->id->t_kbctag, sc->id->t_kbcslot, - gsckbd_input, sc, sc->sc_dev.dv_xname); - - a.console = isconsole; - - a.keymap = &gsckbd_keymapdata; - - a.accessops = &gsckbd_accessops; - a.accesscookie = sc; - - /* - * Attach the wskbd, saving a handle to it. - * XXX XXX XXX - */ - sc->sc_wskbddev = config_found(self, &a, wskbddevprint); -} - -int -gsckbd_enable(v, on) - void *v; - int on; -{ - struct gsckbd_softc *sc = v; - u_char cmd[1]; - int res; - - if (on) { - if (sc->sc_enabled && !sc->id->t_isconsole) - return (EBUSY); - - pckbc_slot_enable(sc->id->t_kbctag, sc->id->t_kbcslot, 1); - - cmd[0] = KBC_ENABLE; - res = pckbc_poll_cmd(sc->id->t_kbctag, sc->id->t_kbcslot, - cmd, 1, 0, NULL, 0); - if (res) { - printf("gsckbd_enable: command error\n"); - return (res); - } - - sc->sc_enabled = 1; - } else { - if (sc->id->t_isconsole) - return (EBUSY); - - cmd[0] = KBC_DISABLE; - res = pckbc_enqueue_cmd(sc->id->t_kbctag, sc->id->t_kbcslot, - cmd, 1, 0, 1, 0); - if (res) { - printf("gsckbd_disable: command error\n"); - return (res); - } - - pckbc_slot_enable(sc->id->t_kbctag, sc->id->t_kbcslot, 0); - - sc->sc_enabled = 0; - } - - return (0); -} - -static int -gsckbd_decode(id, datain, type, dataout) - struct gsckbd_internal *id; - int datain; - u_int *type; - int *dataout; -{ - int key; - - if (datain == KBR_BREAK) { - id->t_releasing = 1; /* next keycode is a release */ - return 0; - } - - if (datain == KBR_EXTENDED0) { - id->t_extended = 0x80; - return 0; - } else if (datain == KBR_EXTENDED1) { - id->t_extended1 = 2; - return 0; - } - - /* - * Map extended keys to codes 128-254 - * Note that we do not use (datain & 0x7f) because function key - * F7 produces non-extended 0x83 code. Sucker. - */ - key = datain | id->t_extended; - id->t_extended = 0; - - /* - * process BREAK sequence (EXT1 14 77): - * map to (unused) code 7F - */ - if (id->t_extended1 == 2 && datain == 0x14) { - id->t_extended1 = 1; - return 0; - } else if (id->t_extended1 == 1 && datain == 0x77) { - id->t_extended1 = 0; - key = 0x7f; - } else if (id->t_extended1 > 0) { - id->t_extended1 = 0; - } - - if (id->t_releasing) { - id->t_releasing = 0; - *type = WSCONS_EVENT_KEY_UP; - *dataout = key; - id->t_lastchar = 0; - } else { - /* Always ignore typematic keys */ - if (key == id->t_lastchar) - return 0; - *dataout = id->t_lastchar = key; - *type = WSCONS_EVENT_KEY_DOWN; - } - - return 1; -} - -int -gsckbd_init(t, kbctag, kbcslot, console) - struct gsckbd_internal *t; - pckbc_tag_t kbctag; - pckbc_slot_t kbcslot; - int console; -{ - bzero(t, sizeof(struct gsckbd_internal)); - - t->t_isconsole = console; - t->t_kbctag = kbctag; - t->t_kbcslot = kbcslot; - - return (0); -} - -static int -gsckbd_led_encode(led) - int led; -{ - int res; - - res = 0; - - if (led & WSKBD_LED_SCROLL) - res |= 0x01; - if (led & WSKBD_LED_NUM) - res |= 0x02; - if (led & WSKBD_LED_CAPS) - res |= 0x04; - return(res); -} - -static int -gsckbd_led_decode(led) - int led; -{ - int res; - - res = 0; - if (led & 0x01) - res |= WSKBD_LED_SCROLL; - if (led & 0x02) - res |= WSKBD_LED_NUM; - if (led & 0x04) - res |= WSKBD_LED_CAPS; - return(res); -} - -void -gsckbd_set_leds(v, leds) - void *v; - int leds; -{ - struct gsckbd_softc *sc = v; - u_char cmd[2]; - - cmd[0] = KBC_MODEIND; - cmd[1] = gsckbd_led_encode(leds); - sc->sc_ledstate = cmd[1]; - - pckbc_enqueue_cmd(sc->id->t_kbctag, sc->id->t_kbcslot, - cmd, 2, 0, 0, 0); -} - -/* - * Got a console receive interrupt - - * the console processor wants to give us a character. - */ -void -gsckbd_input(vsc, data) - void *vsc; - int data; -{ - struct gsckbd_softc *sc = vsc; - int type, key; - -#ifdef WSDISPLAY_COMPAT_RAWKBD - if (sc->rawkbd) { - char d = data; - wskbd_rawinput(sc->sc_wskbddev, &d, 1); - return; - } -#endif - if (gsckbd_decode(sc->id, data, &type, &key)) - wskbd_input(sc->sc_wskbddev, type, key); -} - -int -gsckbd_ioctl(v, cmd, data, flag, p) - void *v; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; -{ - struct gsckbd_softc *sc = v; - - switch (cmd) { - case WSKBDIO_GTYPE: - *(int *)data = WSKBD_TYPE_GSC; - return 0; - case WSKBDIO_SETLEDS: - { - char cmd[2]; - int res; - cmd[0] = KBC_MODEIND; - cmd[1] = gsckbd_led_encode(*(int *)data); - sc->sc_ledstate = cmd[1]; - res = pckbc_enqueue_cmd(sc->id->t_kbctag, sc->id->t_kbcslot, - cmd, 2, 0, 1, 0); - return (res); - } - case WSKBDIO_GETLEDS: - *(int *)data = gsckbd_led_decode(sc->sc_ledstate); - return (0); -#ifdef WSDISPLAY_COMPAT_RAWKBD - case WSKBDIO_SETMODE: - sc->rawkbd = (*(int *)data == WSKBD_RAW); - return (0); -#endif - } - return -1; -} - -int -gsckbd_cnattach(kbctag, kbcslot) - pckbc_tag_t kbctag; - int kbcslot; -{ - char cmd[1]; - int res; - - res = gsckbd_init(&gsckbd_consdata, kbctag, kbcslot, 1); -#if 0 /* we allow the console to be attached if no keyboard is present */ - if (res) - return (res); -#endif - - /* Just to be sure. */ - cmd[0] = KBC_ENABLE; - res = pckbc_poll_cmd(kbctag, kbcslot, cmd, 1, 0, 0, 0); -#if 0 - if (res) - return (res); -#endif - - wskbd_cnattach(&gsckbd_consops, &gsckbd_consdata, &gsckbd_keymapdata); - - return (0); -} - -/* ARGSUSED */ -void -gsckbd_cngetc(v, type, data) - void *v; - u_int *type; - int *data; -{ - struct gsckbd_internal *t = v; - int val; - - for (;;) { - val = pckbc_poll_data(t->t_kbctag, t->t_kbcslot); - if ((val != -1) && gsckbd_decode(t, val, type, data)) - return; - } -} - -void -gsckbd_cnpollc(v, on) - void *v; - int on; -{ - struct gsckbd_internal *t = v; - - pckbc_set_poll(t->t_kbctag, t->t_kbcslot, on); -} diff --git a/sys/arch/hppa/gsc/gsckbdmap.c b/sys/arch/hppa/gsc/gsckbdmap.c deleted file mode 100644 index 0c952b3879d..00000000000 --- a/sys/arch/hppa/gsc/gsckbdmap.c +++ /dev/null @@ -1,1036 +0,0 @@ -/* $OpenBSD: gsckbdmap.c,v 1.22 2008/06/26 05:42:10 ray Exp $ */ - -/* - * THIS FILE IS AUTOMAGICALLY GENERATED. DO NOT EDIT. - * - * generated by: - * OpenBSD: makemap.awk,v 1.6 2005/05/12 16:21:23 miod Exp - * generated from: - */ -/* OpenBSD: wskbdmap_mfii.c,v 1.35 2008/03/21 17:10:46 miod Exp */ -/* $NetBSD: wskbdmap_mfii.c,v 1.15 2000/05/19 16:40:04 drochner Exp $ */ - -/* - * PLEASE DO NOT FORGET TO REGEN - * sys/arch/hppa/gsc/gsckbdmap.c - * sys/dev/usb/ukbdmap.c - * AFTER ANY CHANGES TO THIS FILE! - */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Juergen Hannken-Illjes. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include <sys/types.h> -#include <dev/wscons/wsksymdef.h> -#include <dev/wscons/wsksymvar.h> -#include <hppa/gsc/gsckbdmap.h> - -#define KC(n) KS_KEYCODE(n) - -static const keysym_t gsckbd_keydesc_us[] = { -/* pos command normal shifted */ -/* initially KC(160), KS_AudioMute, */ -/* initially KC(174), KS_AudioLower, */ -/* initially KC(176), KS_AudioRaise, */ -/* initially KC(219), KS_Meta_L, */ -/* initially KC(220), KS_Meta_R, */ -/* initially KC(221), KS_Menu, */ - KC(1), KS_Cmd_Screen8, KS_f9, - KC(3), KS_Cmd_Screen4, KS_f5, - KC(4), KS_Cmd_Screen2, KS_f3, - KC(5), KS_Cmd_Screen0, KS_f1, - KC(6), KS_Cmd_Screen1, KS_f2, - KC(7), KS_Cmd_Screen11,KS_f12, - KC(9), KS_Cmd_Screen9, KS_f10, - KC(10), KS_Cmd_Screen7, KS_f8, - KC(11), KS_Cmd_Screen5, KS_f6, - KC(12), KS_Cmd_Screen3, KS_f4, - KC(13), KS_Tab, - KC(14), KS_grave, KS_asciitilde, - KC(17), KS_Cmd2, KS_Alt_L, - KC(18), KS_Shift_L, - KC(20), KS_Cmd1, KS_Control_L, - KC(21), KS_q, - KC(22), KS_1, KS_exclam, - KC(26), KS_z, - KC(27), KS_s, - KC(28), KS_a, - KC(29), KS_w, - KC(30), KS_2, KS_at, - KC(33), KS_c, - KC(34), KS_x, - KC(35), KS_d, - KC(36), KS_e, - KC(37), KS_4, KS_dollar, - KC(38), KS_3, KS_numbersign, - KC(41), KS_space, - KC(42), KS_v, - KC(43), KS_f, - KC(44), KS_t, - KC(45), KS_r, - KC(46), KS_5, KS_percent, - KC(49), KS_n, - KC(50), KS_b, - KC(51), KS_h, - KC(52), KS_g, - KC(53), KS_y, - KC(54), KS_6, KS_asciicircum, - KC(58), KS_m, - KC(59), KS_j, - KC(60), KS_u, - KC(61), KS_7, KS_ampersand, - KC(62), KS_8, KS_asterisk, - KC(65), KS_comma, KS_less, - KC(66), KS_k, - KC(67), KS_i, - KC(68), KS_o, - KC(69), KS_0, KS_parenright, - KC(70), KS_9, KS_parenleft, - KC(73), KS_period, KS_greater, - KC(74), KS_slash, KS_question, - KC(75), KS_l, - KC(76), KS_semicolon, KS_colon, - KC(77), KS_p, - KC(78), KS_minus, KS_underscore, - KC(82), KS_apostrophe, KS_quotedbl, - KC(84), KS_bracketleft, KS_braceleft, - KC(85), KS_equal, KS_plus, - KC(88), KS_Caps_Lock, - KC(89), KS_Shift_R, - KC(90), KS_Return, - KC(91), KS_bracketright,KS_braceright, - KC(93), KS_backslash, KS_bar, - KC(102), KS_Cmd_ResetEmul,KS_Delete, - KC(105), KS_KP_End, KS_KP_1, - KC(107), KS_KP_Left, KS_KP_4, - KC(108), KS_KP_Home, KS_KP_7, - KC(112), KS_KP_Insert, KS_KP_0, - KC(113), KS_Cmd_KbdReset,KS_KP_Delete, - KC(114), KS_KP_Down, KS_KP_2, - KC(115), KS_KP_Begin, KS_KP_5, - KC(116), KS_KP_Right, KS_KP_6, - KC(117), KS_KP_Up, KS_KP_8, - KC(118), KS_Cmd_Debugger,KS_Escape, - KC(119), KS_Num_Lock, - KC(120), KS_Cmd_Screen10,KS_f11, - KC(121), KS_KP_Add, - KC(122), KS_KP_Next, KS_KP_3, - KC(123), KS_KP_Subtract, - KC(124), KS_KP_Multiply, - KC(125), KS_KP_Prior, KS_KP_9, - KC(126), KS_Hold_Screen, - KC(127), KS_Pause, /*Break*/ - KC(131), KS_Cmd_Screen6, KS_f7, - KC(145), KS_Cmd2, KS_Alt_R, KS_Multi_key, - KC(148), KS_Cmd1, KS_Control_R, - KC(202), KS_KP_Divide, - KC(218), KS_KP_Enter, - KC(233), KS_End, - KC(235), KS_Left, - KC(236), KS_Home, - KC(240), KS_Insert, - KC(242), KS_Down, - KC(244), KS_Right, - KC(245), KS_Up, - KC(250), KS_Cmd_ScrollFwd,KS_Next, - KC(252), KS_Print_Screen, - KC(253), KS_Cmd_ScrollBack,KS_Prior, - KC(241), KS_Delete -}; - -static const keysym_t gsckbd_keydesc_precisionbook[] = { -/* pos command normal shifted */ - KC(7), KS_Cmd_Screen0, KS_f1, - KC(15), KS_Cmd_Screen1, KS_f2, - KC(23), KS_Cmd_Screen2, KS_f3, - KC(31), KS_Cmd_Screen3, KS_f4, - KC(39), KS_Cmd_Screen4, KS_f5, - KC(47), KS_Cmd_Screen5, KS_f6, - KC(55), KS_Cmd_Screen6, KS_f7, - KC(63), KS_Cmd_Screen7, KS_f8, - KC(71), KS_Cmd_Screen8, KS_f9, - KC(79), KS_Cmd_Screen9, KS_f10, - KC(86), KS_Cmd_Screen10, KS_f11, - KC(94), KS_Cmd_Screen11, KS_f12, - KC(8), KS_Cmd_Debugger, KS_Escape, - KC(87), KS_Print_Screen, - KC(92), KS_backslash, KS_bar, - KC(96), KS_KP_Down, KS_KP_2, - KC(95), KS_Hold_Screen, - KC(97), KS_KP_Left, KS_KP_4, - KC(98), KS_Pause, /* Break */ - KC(99), KS_KP_Up, KS_KP_8, - KC(100), KS_KP_Delete, KS_KP_Decimal, - KC(101), KS_KP_End, KS_KP_1, - KC(103), KS_KP_Insert, KS_KP_0, - KC(106), KS_KP_Right, KS_KP_6, - KC(109), KS_KP_Next, KS_KP_3, - KC(110), KS_KP_Home, KS_KP_7, - KC(111), KS_KP_Prior, KS_KP_9, - KC(20), KS_Caps_Lock, - KC(17), KS_Cmd1, KS_Control_L, - KC(88), KS_Cmd1, KS_Control_R, - KC(25), KS_Cmd2, KS_Alt_L, - KC(57), KS_Cmd2, KS_Alt_R, KS_Multi_key, - KC(139), KS_Meta_L, - KC(140), KS_Meta_R, -}; - -#if !defined(WSKBD_NO_INTL_LAYOUTS) - -static const keysym_t gsckbd_keydesc_de[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_dead_circumflex,KS_dead_abovering, - KC(21), KS_q, KS_Q, KS_at, - KC(26), KS_y, - KC(30), KS_2, KS_quotedbl, KS_twosuperior, - KC(38), KS_3, KS_section, KS_threesuperior, - KC(53), KS_z, - KC(54), KS_6, KS_ampersand, - KC(58), KS_m, KS_M, KS_mu, - KC(61), KS_7, KS_slash, KS_braceleft, - KC(62), KS_8, KS_parenleft, KS_bracketleft, - KC(65), KS_comma, KS_semicolon, - KC(69), KS_0, KS_equal, KS_braceright, - KC(70), KS_9, KS_parenright, KS_bracketright, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, - KC(76), KS_odiaeresis, - KC(78), KS_ssharp, KS_question, KS_backslash, - KC(82), KS_adiaeresis, - KC(84), KS_udiaeresis, - KC(85), KS_dead_acute, KS_dead_grave, - KC(91), KS_plus, KS_asterisk, KS_dead_tilde, - KC(93), KS_numbersign, KS_apostrophe, - KC(97), KS_less, KS_greater, KS_bar, KS_brokenbar, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_de_nodead[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_asciicircum, KS_degree, - KC(85), KS_apostrophe, KS_grave, - KC(91), KS_plus, KS_asterisk, KS_asciitilde, -}; - -static const keysym_t gsckbd_keydesc_dk[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_onehalf, KS_paragraph, - KC(30), KS_2, KS_quotedbl, KS_at, - KC(37), KS_4, KS_currency, KS_dollar, - KC(38), KS_3, KS_numbersign, KS_sterling, - KC(54), KS_6, KS_ampersand, - KC(61), KS_7, KS_slash, KS_braceleft, - KC(62), KS_8, KS_parenleft, KS_bracketleft, - KC(65), KS_comma, KS_semicolon, - KC(69), KS_0, KS_equal, KS_braceright, - KC(70), KS_9, KS_parenright, KS_bracketright, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, - KC(76), KS_ae, - KC(78), KS_plus, KS_question, - KC(82), KS_oslash, - KC(84), KS_aring, - KC(85), KS_dead_acute, KS_dead_grave, KS_bar, - KC(91), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde, - KC(93), KS_apostrophe, KS_asterisk, - KC(97), KS_less, KS_greater, KS_backslash, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_dk_nodead[] = { -/* pos normal shifted altgr shift-altgr */ - KC(85), KS_apostrophe, KS_grave, KS_bar, - KC(91), KS_diaeresis, KS_asciicircum, KS_asciitilde, -}; - -static const keysym_t gsckbd_keydesc_sv[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_section, KS_onehalf, - KC(76), KS_odiaeresis, - KC(78), KS_plus, KS_question, KS_backslash, - KC(82), KS_adiaeresis, - KC(91), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde, - KC(97), KS_less, KS_greater, KS_bar, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_sv_nodead[] = { -/* pos normal shifted altgr shift-altgr */ - KC(85), KS_apostrophe, KS_grave, KS_bar, - KC(91), KS_diaeresis, KS_asciicircum, KS_asciitilde, -}; - -static const keysym_t gsckbd_keydesc_no[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_bar, KS_paragraph, - KC(76), KS_oslash, - KC(82), KS_ae, - KC(85), KS_backslash, KS_dead_grave, KS_dead_acute, - KC(91), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde, - KC(97), KS_less, KS_greater, -}; - -static const keysym_t gsckbd_keydesc_no_nodead[] = { -/* pos normal shifted altgr shift-altgr */ - KC(85), KS_backslash, KS_grave, KS_acute, - KC(91), KS_diaeresis, KS_asciicircum, KS_asciitilde, -}; - -static const keysym_t gsckbd_keydesc_fr[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_twosuperior, - KC(21), KS_a, - KC(22), KS_ampersand, KS_1, - KC(26), KS_w, - KC(28), KS_q, - KC(29), KS_z, - KC(30), KS_eacute, KS_2, KS_asciitilde, - KC(37), KS_apostrophe, KS_4, KS_braceleft, - KC(38), KS_quotedbl, KS_3, KS_numbersign, - KC(46), KS_parenleft, KS_5, KS_bracketleft, - KC(54), KS_minus, KS_6, KS_bar, - KC(58), KS_comma, KS_question, - KC(61), KS_egrave, KS_7, KS_grave, - KC(62), KS_underscore, KS_8, KS_backslash, - KC(65), KS_semicolon, KS_period, - KC(69), KS_agrave, KS_0, KS_at, - KC(70), KS_ccedilla, KS_9, KS_asciicircum, - KC(73), KS_colon, KS_slash, - KC(74), KS_exclam, KS_section, - KC(76), KS_m, - KC(78), KS_parenright, KS_degree, KS_bracketright, - KC(82), KS_ugrave, KS_percent, - KC(84), KS_dead_circumflex,KS_dead_diaeresis, - KC(85), KS_equal, KS_plus, KS_braceright, - KC(91), KS_dollar, KS_sterling, KS_currency, - KC(93), KS_asterisk, KS_mu, - KC(97), KS_less, KS_greater, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_it[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_backslash, KS_bar, - KC(30), KS_2, KS_quotedbl, KS_twosuperior, - KC(38), KS_3, KS_sterling, KS_threesuperior, - KC(46), KS_5, KS_percent, - KC(54), KS_6, KS_ampersand, - KC(61), KS_7, KS_slash, - KC(62), KS_8, KS_parenleft, - KC(65), KS_comma, KS_semicolon, - KC(69), KS_0, KS_equal, - KC(70), KS_9, KS_parenright, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, - KC(76), KS_ograve, KS_Ccedilla, KS_at, - KC(78), KS_apostrophe, KS_question, - KC(82), KS_agrave, KS_degree, KS_numbersign, - KC(84), KS_egrave, KS_eacute, KS_braceleft, KS_bracketleft, - KC(85), KS_igrave, KS_asciicircum, - KC(91), KS_plus, KS_asterisk, KS_braceright, KS_bracketright, - KC(93), KS_ugrave, KS_section, - KC(97), KS_less, KS_greater, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_uk[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_grave, KS_grave, KS_agrave, KS_agrave, - KC(22), KS_1, KS_exclam, KS_plusminus, KS_exclamdown, - KC(30), KS_2, KS_quotedbl, KS_twosuperior, KS_cent, - KC(37), KS_4, KS_dollar, KS_acute, KS_currency, - KC(38), KS_3, KS_sterling, KS_threesuperior, - KC(46), KS_5, KS_percent, KS_mu, KS_yen, - KC(54), KS_6, KS_asciicircum, KS_paragraph, - KC(61), KS_7, KS_ampersand, KS_periodcentered,KS_brokenbar, - KC(62), KS_8, KS_asterisk, KS_cedilla, KS_ordfeminine, - KC(69), KS_0, KS_parenright, KS_masculine, KS_copyright, - KC(70), KS_9, KS_parenleft, KS_onesuperior, KS_diaeresis, - KC(78), KS_minus, KS_underscore, KS_hyphen, KS_ssharp, - KC(82), KS_apostrophe, KS_at, KS_section, KS_Agrave, - KC(85), KS_equal, KS_plus, KS_onehalf, KS_guillemotleft, - KC(93), KS_numbersign, KS_asciitilde, KS_sterling, KS_thorn, - KC(97), KS_backslash, KS_bar, KS_Udiaeresis, -}; - -static const keysym_t gsckbd_keydesc_jp[] = { -/* pos normal shifted altgr shift-altgr */ -/* initially KC(112), KS_Hiragana_Katakana, */ -/* initially KC(115), KS_backslash, KS_underscore, */ -/* initially KC(121), KS_Henkan, */ -/* initially KC(123), KS_Muhenkan, */ -/* initially KC(125), KS_backslash, KS_bar, */ - KC(14), KS_Zenkaku_Hankaku,/*replacegrave/tilde*/ - KC(30), KS_2, KS_quotedbl, - KC(54), KS_6, KS_ampersand, - KC(61), KS_7, KS_apostrophe, - KC(62), KS_8, KS_parenleft, - KC(69), KS_0, - KC(70), KS_9, KS_parenright, - KC(76), KS_semicolon, KS_plus, - KC(78), KS_minus, KS_equal, - KC(82), KS_colon, KS_asterisk, - KC(84), KS_at, KS_grave, - KC(85), KS_asciicircum, KS_asciitilde, - KC(91), KS_bracketleft, KS_braceleft, - KC(93), KS_bracketright,KS_braceright, -}; - -static const keysym_t gsckbd_keydesc_es[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_degree, KS_ordfeminine, KS_backslash, - KC(22), KS_1, KS_exclam, KS_bar, - KC(30), KS_2, KS_quotedbl, KS_at, - KC(37), KS_4, KS_dollar, KS_asciitilde, - KC(38), KS_3, KS_periodcentered,KS_numbersign, - KC(54), KS_6, KS_ampersand, - KC(61), KS_7, KS_slash, - KC(62), KS_8, KS_parenleft, - KC(65), KS_comma, KS_semicolon, - KC(69), KS_0, KS_equal, - KC(70), KS_9, KS_parenright, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, - KC(76), KS_ntilde, - KC(78), KS_apostrophe, KS_question, - KC(82), KS_dead_acute, KS_dead_diaeresis,KS_braceleft, - KC(84), KS_dead_grave, KS_dead_circumflex,KS_bracketleft, - KC(85), KS_exclamdown, KS_questiondown, - KC(91), KS_plus, KS_asterisk, KS_bracketright, - KC(93), KS_ccedilla, KS_Ccedilla, KS_braceright, - KC(97), KS_less, KS_greater, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_lt[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_grave, KS_asciitilde, - KC(21), KS_L7_aogonek, KS_L7_Aogonek, - KC(22), KS_exclam, KS_1, KS_at, - KC(29), KS_L7_zcaron, KS_L7_Zcaron, - KC(30), KS_minus, KS_2, KS_underscore, - KC(34), KS_L7_umacron, KS_L7_Umacron, - KC(36), KS_e, KS_E, KS_currency, - KC(37), KS_semicolon, KS_4, KS_dollar, - KC(38), KS_slash, KS_3, KS_numbersign, - KC(41), KS_space, KS_space, KS_nobreakspace, - KC(43), KS_L7_scaron, KS_L7_Scaron, - KC(46), KS_colon, KS_5, KS_paragraph, - KC(54), KS_comma, KS_6, KS_asciicircum, - KC(61), KS_period, KS_7, KS_ampersand, - KC(62), KS_equal, KS_8, KS_asterisk, - KC(65), KS_L7_ccaron, KS_L7_Ccaron, KS_L7_dbllow9quot, - KC(69), KS_bracketright,KS_0, KS_parenright, - KC(70), KS_bracketleft, KS_9, KS_parenleft, - KC(73), KS_f, KS_F, KS_L7_leftdblquot, - KC(74), KS_L7_eogonek, KS_L7_Eogonek, KS_backslash, - KC(76), KS_L7_uogonek, KS_L7_Uogonek, - KC(78), KS_question, KS_plus, KS_apostrophe, - KC(82), KS_L7_edot, KS_L7_Edot, KS_quotedbl, - KC(84), KS_L7_iogonek, KS_L7_Iogonek, KS_braceleft, - KC(85), KS_x, KS_X, KS_percent, - KC(91), KS_w, KS_W, KS_braceright, - KC(93), KS_q, KS_Q, KS_bar, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_be[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_twosuperior, KS_threesuperior, - KC(21), KS_a, - KC(22), KS_ampersand, KS_1, KS_bar, - KC(26), KS_w, - KC(28), KS_q, - KC(29), KS_z, - KC(30), KS_eacute, KS_2, KS_at, - KC(37), KS_apostrophe, KS_4, - KC(38), KS_quotedbl, KS_3, KS_numbersign, - KC(46), KS_parenleft, KS_5, - KC(54), KS_section, KS_6, KS_asciicircum, - KC(58), KS_comma, KS_question, - KC(61), KS_egrave, KS_7, - KC(62), KS_exclam, KS_8, - KC(65), KS_semicolon, KS_period, - KC(69), KS_agrave, KS_0, KS_braceright, - KC(70), KS_ccedilla, KS_9, KS_braceleft, - KC(73), KS_colon, KS_slash, - KC(74), KS_equal, KS_plus, KS_asciitilde, - KC(76), KS_m, - KC(78), KS_parenright, KS_degree, - KC(82), KS_ugrave, KS_percent, KS_acute, - KC(84), KS_dead_circumflex,KS_dead_diaeresis,KS_bracketleft, - KC(85), KS_minus, KS_underscore, - KC(91), KS_dollar, KS_asterisk, KS_bracketright, - KC(93), KS_mu, KS_sterling, KS_grave, - KC(97), KS_less, KS_greater, KS_backslash, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - - -static const keysym_t gsckbd_keydesc_us_dvorak[] = { -/* pos command normal shifted */ - KC(21), KS_apostrophe, KS_quotedbl, - KC(26), KS_semicolon, KS_colon, - KC(27), KS_o, - KC(29), KS_comma, KS_less, - KC(33), KS_j, - KC(34), KS_q, - KC(35), KS_e, - KC(36), KS_period, KS_greater, - KC(42), KS_k, - KC(43), KS_u, - KC(44), KS_y, - KC(45), KS_p, - KC(49), KS_b, - KC(50), KS_x, - KC(51), KS_d, - KC(52), KS_i, - KC(53), KS_f, - KC(59), KS_h, - KC(60), KS_g, - KC(65), KS_w, - KC(66), KS_t, - KC(67), KS_c, - KC(68), KS_r, - KC(73), KS_v, - KC(74), KS_z, - KC(75), KS_n, - KC(76), KS_s, - KC(77), KS_l, - KC(78), KS_bracketleft, KS_braceleft, - KC(82), KS_minus, KS_underscore, - KC(84), KS_slash, KS_question, - KC(85), KS_bracketright,KS_braceright, - KC(91), KS_equal, KS_plus, -}; - -static const keysym_t gsckbd_keydesc_swapctrlcaps[] = { -/* pos command normal shifted */ - KC(20), KS_Caps_Lock, - KC(88), KS_Cmd1, KS_Control_L, -}; - -static const keysym_t gsckbd_keydesc_iopener[] = { -/* pos command normal shifted */ - KC(1), KS_Cmd_Screen7, KS_f8, - KC(3), KS_Cmd_Screen3, KS_f4, - KC(4), KS_Cmd_Screen1, KS_f2, - KC(5), KS_Cmd_Debugger,KS_Escape, - KC(6), KS_Cmd_Screen0, KS_f1, - KC(7), KS_f11, - KC(9), KS_Cmd_Screen8, KS_f9, - KC(10), KS_Cmd_Screen6, KS_f7, - KC(11), KS_Cmd_Screen4, KS_f5, - KC(12), KS_Cmd_Screen2, KS_f3, - KC(120), KS_Cmd_Screen9, KS_f10, - KC(131), KS_Cmd_Screen5, KS_f6, -}; - -static const keysym_t gsckbd_keydesc_ru[] = { -/* pos normal shifted altgr shift-altgr */ - KC(21), KS_q, KS_Q, KS_Cyrillic_ishort,KS_Cyrillic_ISHORT, - KC(26), KS_z, KS_Z, KS_Cyrillic_ya, KS_Cyrillic_YA, - KC(27), KS_s, KS_S, KS_Cyrillic_yeru,KS_Cyrillic_YERU, - KC(28), KS_a, KS_A, KS_Cyrillic_ef, KS_Cyrillic_EF, - KC(29), KS_w, KS_W, KS_Cyrillic_tse,KS_Cyrillic_TSE, - KC(33), KS_c, KS_C, KS_Cyrillic_es, KS_Cyrillic_ES, - KC(34), KS_x, KS_X, KS_Cyrillic_che,KS_Cyrillic_CHE, - KC(35), KS_d, KS_D, KS_Cyrillic_ve, KS_Cyrillic_VE, - KC(36), KS_e, KS_E, KS_Cyrillic_u, KS_Cyrillic_U, - KC(42), KS_v, KS_V, KS_Cyrillic_em, KS_Cyrillic_EM, - KC(43), KS_f, KS_F, KS_Cyrillic_a, KS_Cyrillic_A, - KC(44), KS_t, KS_T, KS_Cyrillic_ie, KS_Cyrillic_IE, - KC(45), KS_r, KS_R, KS_Cyrillic_ka, KS_Cyrillic_KA, - KC(49), KS_n, KS_N, KS_Cyrillic_te, KS_Cyrillic_TE, - KC(50), KS_b, KS_B, KS_Cyrillic_i, KS_Cyrillic_I, - KC(51), KS_h, KS_H, KS_Cyrillic_er, KS_Cyrillic_ER, - KC(52), KS_g, KS_G, KS_Cyrillic_pe, KS_Cyrillic_PE, - KC(53), KS_y, KS_Y, KS_Cyrillic_en, KS_Cyrillic_EN, - KC(54), KS_6, KS_asciicircum, KS_6, KS_comma, - KC(58), KS_m, KS_M, KS_Cyrillic_ssighn,KS_Cyrillic_SSIGHN, - KC(59), KS_j, KS_J, KS_Cyrillic_o, KS_Cyrillic_O, - KC(60), KS_u, KS_U, KS_Cyrillic_ge, KS_Cyrillic_GE, - KC(61), KS_7, KS_ampersand, KS_7, KS_period, - KC(65), KS_comma, KS_less, KS_Cyrillic_be, KS_Cyrillic_BE, - KC(66), KS_k, KS_K, KS_Cyrillic_el, KS_Cyrillic_EL, - KC(67), KS_i, KS_I, KS_Cyrillic_sha,KS_Cyrillic_SHA, - KC(68), KS_o, KS_O, KS_Cyrillic_scha,KS_Cyrillic_SCHA, - KC(73), KS_period, KS_greater, KS_Cyrillic_yu, KS_Cyrillic_YU, - KC(74), KS_slash, KS_question, KS_Cyrillic_yo, KS_Cyrillic_YO, - KC(75), KS_l, KS_L, KS_Cyrillic_de, KS_Cyrillic_DE, - KC(76), KS_semicolon, KS_colon, KS_Cyrillic_zhe,KS_Cyrillic_ZHE, - KC(77), KS_p, KS_P, KS_Cyrillic_ze, KS_Cyrillic_ZE, - KC(82), KS_apostrophe, KS_quotedbl, KS_Cyrillic_e, KS_Cyrillic_E, - KC(84), KS_bracketleft, KS_braceleft, KS_Cyrillic_ha, KS_Cyrillic_HA, - KC(91), KS_bracketright,KS_braceright, KS_Cyrillic_hsighn,KS_Cyrillic_HSIGHN, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_ua[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_grave, KS_asciitilde, KS_Cyrillic_gheukr,KS_Cyrillic_GHEUKR, - KC(21), KS_q, KS_Q, KS_Cyrillic_ishort,KS_Cyrillic_ISHORT, - KC(26), KS_z, KS_Z, KS_Cyrillic_ya, KS_Cyrillic_YA, - KC(27), KS_s, KS_S, KS_Cyrillic_yeru,KS_Cyrillic_YERU, - KC(28), KS_a, KS_A, KS_Cyrillic_ef, KS_Cyrillic_EF, - KC(29), KS_w, KS_W, KS_Cyrillic_tse,KS_Cyrillic_TSE, - KC(33), KS_c, KS_C, KS_Cyrillic_es, KS_Cyrillic_ES, - KC(34), KS_x, KS_X, KS_Cyrillic_che,KS_Cyrillic_CHE, - KC(35), KS_d, KS_D, KS_Cyrillic_ve, KS_Cyrillic_VE, - KC(36), KS_e, KS_E, KS_Cyrillic_u, KS_Cyrillic_U, - KC(42), KS_v, KS_V, KS_Cyrillic_em, KS_Cyrillic_EM, - KC(43), KS_f, KS_F, KS_Cyrillic_a, KS_Cyrillic_A, - KC(44), KS_t, KS_T, KS_Cyrillic_ie, KS_Cyrillic_IE, - KC(45), KS_r, KS_R, KS_Cyrillic_ka, KS_Cyrillic_KA, - KC(49), KS_n, KS_N, KS_Cyrillic_te, KS_Cyrillic_TE, - KC(50), KS_b, KS_B, KS_Cyrillic_i, KS_Cyrillic_I, - KC(51), KS_h, KS_H, KS_Cyrillic_er, KS_Cyrillic_ER, - KC(52), KS_g, KS_G, KS_Cyrillic_pe, KS_Cyrillic_PE, - KC(53), KS_y, KS_Y, KS_Cyrillic_en, KS_Cyrillic_EN, - KC(54), KS_6, KS_asciicircum, KS_6, KS_comma, - KC(58), KS_m, KS_M, KS_Cyrillic_ssighn,KS_Cyrillic_SSIGHN, - KC(59), KS_j, KS_J, KS_Cyrillic_o, KS_Cyrillic_O, - KC(60), KS_u, KS_U, KS_Cyrillic_ge, KS_Cyrillic_GE, - KC(61), KS_7, KS_ampersand, KS_7, KS_period, - KC(65), KS_comma, KS_less, KS_Cyrillic_be, KS_Cyrillic_BE, - KC(66), KS_k, KS_K, KS_Cyrillic_el, KS_Cyrillic_EL, - KC(67), KS_i, KS_I, KS_Cyrillic_sha,KS_Cyrillic_SHA, - KC(68), KS_o, KS_O, KS_Cyrillic_scha,KS_Cyrillic_SCHA, - KC(73), KS_period, KS_greater, KS_Cyrillic_yu, KS_Cyrillic_YU, - KC(74), KS_slash, KS_question, KS_Cyrillic_yo, KS_Cyrillic_YO, - KC(75), KS_l, KS_L, KS_Cyrillic_de, KS_Cyrillic_DE, - KC(76), KS_semicolon, KS_colon, KS_Cyrillic_zhe,KS_Cyrillic_ZHE, - KC(77), KS_p, KS_P, KS_Cyrillic_ze, KS_Cyrillic_ZE, - KC(78), KS_minus, KS_underscore, KS_Cyrillic_iukr,KS_Cyrillic_IUKR, - KC(82), KS_apostrophe, KS_quotedbl, KS_Cyrillic_e, KS_Cyrillic_E, - KC(84), KS_bracketleft, KS_braceleft, KS_Cyrillic_ha, KS_Cyrillic_HA, - KC(85), KS_equal, KS_plus, KS_Cyrillic_yeukr,KS_Cyrillic_YEUKR, - KC(91), KS_bracketright,KS_braceright, KS_Cyrillic_hsighn,KS_Cyrillic_HSIGHN, - KC(93), KS_backslash, KS_bar, KS_Cyrillic_yi, KS_Cyrillic_YI, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_sg[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_section, KS_degree, KS_dead_abovering, - KC(22), KS_1, KS_plus, KS_bar, - KC(26), KS_y, - KC(30), KS_2, KS_quotedbl, KS_at, - KC(36), KS_e, KS_E, KS_currency, - KC(37), KS_4, KS_ccedilla, - KC(38), KS_3, KS_asterisk, KS_numbersign, - KC(53), KS_z, - KC(54), KS_6, KS_ampersand, KS_notsign, - KC(61), KS_7, KS_slash, KS_brokenbar, - KC(62), KS_8, KS_parenleft, KS_cent, - KC(65), KS_comma, KS_semicolon, - KC(69), KS_0, KS_equal, - KC(70), KS_9, KS_parenright, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, - KC(76), KS_odiaeresis, KS_eacute, - KC(78), KS_apostrophe, KS_question, KS_dead_acute, - KC(82), KS_adiaeresis, KS_agrave, KS_braceleft, - KC(84), KS_udiaeresis, KS_egrave, KS_bracketleft, - KC(85), KS_dead_circumflex,KS_dead_grave,KS_dead_tilde, - KC(91), KS_dead_diaeresis,KS_exclam, KS_bracketright, - KC(93), KS_dollar, KS_sterling, KS_braceright, - KC(97), KS_less, KS_greater, KS_backslash, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_sg_nodead[] = { -/* pos normal shifted altgr shift-altgr */ - KC(78), KS_apostrophe, KS_question, KS_acute, - KC(85), KS_asciicircum, KS_grave, KS_asciitilde, - KC(91), KS_diaeresis, KS_exclam, KS_bracketright, -}; - -static const keysym_t gsckbd_keydesc_sf[] = { -/* pos normal shifted altgr shift-altgr */ - KC(76), KS_eacute, KS_odiaeresis, - KC(82), KS_agrave, KS_adiaeresis, KS_braceleft, - KC(84), KS_egrave, KS_udiaeresis, KS_bracketleft, -}; - -static const keysym_t gsckbd_keydesc_pt[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_backslash, KS_bar, - KC(30), KS_2, KS_quotedbl, KS_at, - KC(38), KS_3, KS_numbersign, KS_sterling, - KC(54), KS_6, KS_ampersand, - KC(61), KS_7, KS_slash, KS_braceleft, - KC(62), KS_8, KS_parenleft, KS_bracketleft, - KC(65), KS_comma, KS_semicolon, - KC(69), KS_0, KS_equal, KS_braceright, - KC(70), KS_9, KS_parenright, KS_bracketright, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, - KC(76), KS_ccedilla, KS_Ccedilla, - KC(78), KS_apostrophe, KS_question, - KC(82), KS_masculine, KS_ordfeminine, - KC(84), KS_plus, KS_asterisk, - KC(85), KS_less, KS_greater, - KC(91), KS_dead_acute, KS_dead_grave, - KC(93), KS_dead_tilde, KS_dead_circumflex, - KC(97), KS_less, KS_greater, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_la[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_bar, KS_degree, KS_notsign, - KC(21), KS_q, KS_Q, KS_at, - KC(22), KS_1, KS_exclam, - KC(30), KS_2, KS_quotedbl, - KC(38), KS_3, KS_numbersign, - KC(54), KS_6, KS_ampersand, - KC(61), KS_7, KS_slash, - KC(62), KS_8, KS_parenleft, - KC(65), KS_comma, KS_semicolon, - KC(69), KS_0, KS_equal, - KC(70), KS_9, KS_parenright, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, - KC(76), KS_ntilde, - KC(78), KS_apostrophe, KS_question, KS_backslash, - KC(82), KS_braceleft, KS_bracketleft, KS_dead_circumflex, - KC(84), KS_dead_acute, KS_dead_diaeresis, - KC(85), KS_questiondown,KS_exclamdown, - KC(91), KS_plus, KS_asterisk, KS_asciitilde, - KC(93), KS_braceright, KS_bracketright,KS_dead_grave, - KC(97), KS_less, KS_greater, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_br[] = { -/* pos normal shifted altgr shift-altgr */ -/* initially KC(115), KS_slash, KS_question, KS_degree, */ - KC(14), KS_apostrophe, KS_quotedbl, - KC(22), KS_1, KS_exclam, KS_onesuperior, - KC(30), KS_2, KS_at, KS_twosuperior, - KC(37), KS_4, KS_dollar, KS_sterling, - KC(38), KS_3, KS_numbersign, KS_threesuperior, - KC(46), KS_5, KS_percent, KS_cent, - KC(54), KS_6, KS_dead_diaeresis,KS_notsign, - KC(74), KS_semicolon, KS_colon, - KC(76), KS_ccedilla, KS_Ccedilla, - KC(82), KS_dead_tilde, KS_dead_circumflex, - KC(84), KS_dead_acute, KS_dead_grave, - KC(85), KS_equal, KS_plus, KS_section, - KC(91), KS_bracketleft, KS_braceleft, KS_ordfeminine, - KC(93), KS_bracketright,KS_braceright, KS_masculine, - KC(97), KS_backslash, KS_bar, - KC(113), KS_KP_Delete, KS_KP_Decimal, -}; - -static const keysym_t gsckbd_keydesc_tr[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_quotedbl, KS_eacute, - KC(21), KS_q, KS_Q, KS_at, - KC(30), KS_2, KS_apostrophe, KS_sterling, - KC(37), KS_4, KS_plus, KS_dollar, - KC(38), KS_3, KS_asciicircum, KS_numbersign, - KC(46), KS_5, KS_percent, KS_onehalf, - KC(54), KS_6, KS_ampersand, - KC(61), KS_7, KS_slash, KS_braceleft, - KC(62), KS_8, KS_parenleft, KS_bracketleft, - KC(65), KS_odiaeresis, KS_Odiaeresis, - KC(67), KS_L5_idotless, KS_I, - KC(69), KS_0, KS_equal, KS_braceright, - KC(70), KS_9, KS_parenright, KS_bracketright, - KC(73), KS_ccedilla, KS_Ccedilla, - KC(74), KS_period, KS_colon, - KC(76), KS_L5_scedilla, KS_L5_Scedilla, KS_dead_acute, - KC(78), KS_asterisk, KS_question, KS_backslash, - KC(82), KS_i, KS_L5_Idotabove, - KC(84), KS_L5_gbreve, KS_L5_Gbreve, KS_dead_diaeresis, - KC(85), KS_minus, KS_underscore, - KC(91), KS_udiaeresis, KS_Udiaeresis, KS_asciitilde, - KC(93), KS_comma, KS_semicolon, KS_dead_grave, - KC(97), KS_less, KS_greater, KS_bar, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_tr_nodead[] = { -/* pos normal shifted altgr shift-altgr */ - KC(76), KS_L5_scedilla, KS_L5_Scedilla, KS_apostrophe, - KC(84), KS_L5_gbreve, KS_L5_Gbreve, - KC(93), KS_comma, KS_semicolon, KS_grave, -}; - -static const keysym_t gsckbd_keydesc_pl[] = { -/* pos normal shifted altgr shift-altgr */ - KC(26), KS_z, KS_Z, KS_L2_zdotabove,KS_L2_Zdotabove, - KC(27), KS_s, KS_S, KS_L2_sacute, KS_L2_Sacute, - KC(28), KS_a, KS_A, KS_L2_aogonek, KS_L2_Aogonek, - KC(33), KS_c, KS_C, KS_L2_cacute, KS_L2_Cacute, - KC(34), KS_x, KS_X, KS_L2_zacute, KS_L2_Zacute, - KC(36), KS_e, KS_E, KS_L2_eogonek, KS_L2_Eogonek, - KC(49), KS_n, KS_N, KS_L2_nacute, KS_L2_Nacute, - KC(68), KS_o, KS_O, KS_oacute, KS_Oacute, - KC(75), KS_l, KS_L, KS_L2_lstroke, KS_L2_Lstroke, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_hu[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_0, KS_section, - KC(21), KS_q, KS_Q, KS_backslash, - KC(22), KS_1, KS_apostrophe, KS_asciitilde, - KC(26), KS_y, KS_Y, KS_greater, - KC(29), KS_w, KS_W,KS_bar, - KC(30), KS_2, KS_quotedbl, - KC(33), KS_c, KS_C, KS_ampersand, - KC(34), KS_x, KS_X, KS_numbersign, - KC(37), KS_4, KS_exclam, - KC(38), KS_3, KS_plus, KS_asciicircum, - KC(42), KS_v, KS_V, KS_at, - KC(43), KS_f, KS_F, KS_bracketleft, - KC(46), KS_5, KS_percent, - KC(49), KS_n, KS_N, KS_braceright, - KC(50), KS_b, KS_B, KS_braceleft, - KC(52), KS_g, KS_G, KS_bracketright, - KC(53), KS_z, KS_Z, - KC(54), KS_6, KS_slash, - KC(59), KS_j, KS_J, KS_iacute, - KC(61), KS_7, KS_equal,KS_grave, - KC(62), KS_8, KS_parenleft, - KC(65), KS_comma, KS_question, KS_semicolon, - KC(67), KS_i, KS_I, KS_iacute, - KC(69), KS_odiaeresis, KS_Odiaeresis, - KC(70), KS_9, KS_parenright, KS_acute, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, KS_asterisk, - KC(76), KS_eacute, KS_Eacute, KS_dollar, - KC(78), KS_udiaeresis, KS_Udiaeresis, - KC(82), KS_aacute, KS_Aacute, KS_ssharp, - KC(84), KS_odoubleacute,KS_Odoubleacute,KS_division, - KC(85), KS_oacute, KS_Oacute, - KC(91), KS_uacute, KS_Uacute, KS_multiply, - KC(93), KS_udoubleacute,KS_Udoubleacute,KS_currency, - KC(97), KS_iacute, KS_Iacute, KS_less, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_si[]= -{ -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_cedilla, KS_diaeresis, - KC(21), KS_q, KS_Q, KS_backslash, - KC(22), KS_1, KS_exclam, KS_asciitilde, - KC(26), KS_y, KS_Y, - KC(29), KS_w, KS_W, KS_bar, - KC(30), KS_2, KS_quotedbl, KS_L2_caron, - KC(37), KS_4, KS_dollar, KS_L2_breve, - KC(38), KS_3, KS_numbersign, KS_asciicircum, - KC(42), KS_v, KS_V, KS_at, - KC(43), KS_f, KS_F, KS_bracketleft, - KC(46), KS_5, KS_percent, KS_degree, - KC(49), KS_n, KS_N, KS_braceright, - KC(50), KS_b, KS_B, KS_braceleft, - KC(52), KS_g, KS_G, KS_bracketright, - KC(53), KS_z, KS_Z, - KC(54), KS_6, KS_ampersand, KS_L2_ogonek, - KC(58), KS_m, KS_M, KS_section, - KC(61), KS_7, KS_slash, KS_grave, - KC(62), KS_8, KS_parenleft, KS_L2_dotabove, - KC(65), KS_comma, KS_semicolon, - KC(66), KS_k, KS_K, KS_L2_lstroke, - KC(69), KS_0, KS_equal, KS_L2_dblacute, - KC(70), KS_9, KS_parenright, KS_acute, - KC(73), KS_period, KS_colon, - KC(74), KS_minus, KS_underscore, - KC(75), KS_l, KS_L, KS_L2_Lstroke, - KC(76), KS_L2_ccaron, KS_L2_Ccaron, - KC(78), KS_apostrophe, KS_question, KS_diaeresis, - KC(82), KS_L2_cacute, KS_L2_Cacute, KS_ssharp, - KC(84), KS_L2_scaron, KS_L2_Scaron, KS_division, - KC(85), KS_plus, KS_asterisk, KS_cedilla, - KC(91), KS_L2_dstroke, KS_L2_Dstroke, KS_multiply, - KC(93), KS_L2_zcaron, KS_L2_Zcaron, KS_currency, - KC(97), KS_less, KS_greater, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_cf[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_numbersign, KS_bar, KS_backslash, - KC(22), KS_1, KS_exclam, KS_plusminus, - KC(30), KS_2, KS_quotedbl, KS_at, - KC(37), KS_4, KS_dollar, KS_cent, - KC(38), KS_3, KS_slash, KS_sterling, - KC(46), KS_5, KS_percent, KS_diaeresis, - KC(54), KS_6, KS_question, KS_macron, - KC(58), KS_m, KS_M, KS_mu, - KC(61), KS_7, KS_ampersand, KS_brokenbar, - KC(62), KS_8, KS_asterisk, KS_twosuperior, - KC(65), KS_comma, KS_apostrophe, KS_hyphen, - KC(68), KS_o, KS_O, KS_section, - KC(69), KS_0, KS_parenright, KS_onequarter, - KC(70), KS_9, KS_parenleft, KS_threesuperior, - KC(73), KS_period, KS_period, - KC(74), KS_eacute, KS_Eacute, KS_dead_acute, - KC(76), KS_semicolon, KS_colon, KS_asciitilde, - KC(77), KS_p, KS_P, KS_paragraph, - KC(78), KS_minus, KS_underscore, KS_onehalf, - KC(82), KS_dead_grave, KS_dead_grave, KS_braceleft, - KC(84), KS_dead_circumflex,KS_dead_circumflex,KS_bracketleft, - KC(85), KS_equal, KS_plus, KS_threequarters, - KC(91), KS_dead_cedilla,KS_dead_diaeresis,KS_bracketright, - KC(93), KS_less, KS_greater, KS_braceright, - KC(97), KS_guillemotleft,KS_guillemotright,KS_degree, - KC(145), KS_Mode_switch,KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_cf_nodead[] = { -/* pos normal shifted altgr shift-altgr */ - KC(74), KS_eacute, KS_Eacute, KS_acute, - KC(82), KS_grave, KS_grave, KS_braceleft, - KC(84), KS_asciicircum,KS_asciicircum,KS_bracketleft, - KC(91), KS_cedilla, KS_diaeresis, KS_bracketright, -}; - -static const keysym_t gsckbd_keydesc_lv[] = { -/* pos normal shifted altgr shift-altgr */ - KC(26), KS_z, KS_Z, KS_L7_zcaron, KS_L7_Zcaron, - KC(27), KS_s, KS_S, KS_L7_scaron, KS_L7_Scaron, - KC(28), KS_a, KS_A, KS_L7_amacron, KS_L7_Amacron, - KC(33), KS_c, KS_C, KS_L7_ccaron, KS_L7_Ccaron, - KC(36), KS_e, KS_E, KS_L7_emacron, KS_L7_Emacron, - KC(49), KS_n, KS_N, KS_L7_ncedilla, KS_L7_Ncedilla, - KC(52), KS_g, KS_G, KS_L7_gcedilla, KS_L7_Gcedilla, - KC(60), KS_u, KS_U, KS_L7_umacron, KS_L7_Umacron, - KC(66), KS_k, KS_K, KS_L7_kcedilla, KS_L7_Kcedilla, - KC(67), KS_i, KS_I, KS_L7_imacron, KS_L7_Imacron, - KC(68), KS_o, KS_O, KS_L7_omacron, KS_L7_Omacron, - KC(75), KS_l, KS_L, KS_L7_lcedilla, KS_L7_Lcedilla, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_nl[] = { -/* pos normal shifted altgr shift-altgr */ - KC(14), KS_at, KS_section, KS_notsign, - KC(22), KS_1, KS_exclam, KS_onesuperior, - KC(26), KS_z, KS_Z, KS_guillemotleft, - KC(27), KS_s, KS_S, KS_ssharp, - KC(30), KS_2, KS_quotedbl, KS_twosuperior, - KC(33), KS_c, KS_C, KS_cent, - KC(34), KS_x, KS_X, KS_guillemotright, - KC(37), KS_4, KS_dollar, KS_onequarter, - KC(38), KS_3, KS_numbersign, KS_threesuperior, - KC(45), KS_r, KS_R, KS_paragraph, - KC(46), KS_5, KS_percent, KS_onehalf, - KC(54), KS_6, KS_ampersand, KS_threequarters, - KC(58), KS_m, KS_M, KS_mu, - KC(61), KS_7, KS_underscore, KS_sterling, - KC(62), KS_8, KS_parenleft, KS_braceleft, - KC(65), KS_comma, KS_semicolon, - KC(69), KS_0, KS_apostrophe, - KC(70), KS_9, KS_parenright, KS_braceright, - KC(73), KS_period, KS_colon, KS_periodcentered, - KC(74), KS_minus, KS_equal, - KC(76), KS_plus, KS_plusminus, - KC(78), KS_slash, KS_question, KS_backslash, - KC(82), KS_dead_acute, KS_dead_grave, - KC(84), KS_dead_diaeresis,KS_dead_circumflex, - KC(85), KS_degree, KS_dead_tilde, KS_dead_cedilla, - KC(91), KS_asterisk, KS_bar, - KC(93), KS_less, KS_greater, - KC(97), KS_bracketright,KS_bracketleft, KS_brokenbar, - KC(145), KS_Mode_switch, KS_Multi_key, -}; - -static const keysym_t gsckbd_keydesc_nl_nodead[] = { -/* pos normal shifted altgr shift-altgr */ - KC(82), KS_apostrophe, KS_grave, - KC(84), KS_quotedbl, KS_asciicircum, - KC(85), KS_degree, KS_asciitilde, KS_cedilla, -}; - -#endif /* WSKBD_NO_INTL_LAYOUTS */ - -#define KBD_MAP(name, base, map) \ - { name, base, sizeof(map)/sizeof(keysym_t), map } - -const struct wscons_keydesc gsckbd_keydesctab[] = { - KBD_MAP(KB_US, 0, gsckbd_keydesc_us), -#if !defined(WSKBD_NO_INTL_LAYOUTS) - KBD_MAP(KB_DE, KB_US, gsckbd_keydesc_de), - KBD_MAP(KB_DE | KB_NODEAD, KB_DE, gsckbd_keydesc_de_nodead), - KBD_MAP(KB_FR, KB_US, gsckbd_keydesc_fr), - KBD_MAP(KB_DK, KB_US, gsckbd_keydesc_dk), - KBD_MAP(KB_DK | KB_NODEAD, KB_DK, gsckbd_keydesc_dk_nodead), - KBD_MAP(KB_IT, KB_US, gsckbd_keydesc_it), - KBD_MAP(KB_UK, KB_US, gsckbd_keydesc_uk), - KBD_MAP(KB_JP, KB_US, gsckbd_keydesc_jp), - KBD_MAP(KB_SV, KB_DK, gsckbd_keydesc_sv), - KBD_MAP(KB_SV | KB_NODEAD, KB_SV, gsckbd_keydesc_sv_nodead), - KBD_MAP(KB_NO, KB_DK, gsckbd_keydesc_no), - KBD_MAP(KB_NO | KB_NODEAD, KB_NO, gsckbd_keydesc_no_nodead), - KBD_MAP(KB_US | KB_DVORAK, KB_US, gsckbd_keydesc_us_dvorak), - KBD_MAP(KB_US | KB_SWAPCTRLCAPS, KB_US, gsckbd_keydesc_swapctrlcaps), - KBD_MAP(KB_US | KB_IOPENER, KB_US, gsckbd_keydesc_iopener), - KBD_MAP(KB_JP | KB_SWAPCTRLCAPS, KB_JP, gsckbd_keydesc_swapctrlcaps), - KBD_MAP(KB_FR | KB_SWAPCTRLCAPS, KB_FR, gsckbd_keydesc_swapctrlcaps), - KBD_MAP(KB_BE | KB_SWAPCTRLCAPS, KB_BE, gsckbd_keydesc_swapctrlcaps), - KBD_MAP(KB_US | KB_DVORAK | KB_SWAPCTRLCAPS, KB_US | KB_DVORAK, - gsckbd_keydesc_swapctrlcaps), - KBD_MAP(KB_US | KB_IOPENER | KB_SWAPCTRLCAPS, KB_US | KB_IOPENER, - gsckbd_keydesc_swapctrlcaps), - KBD_MAP(KB_ES, KB_US, gsckbd_keydesc_es), - KBD_MAP(KB_BE, KB_US, gsckbd_keydesc_be), - KBD_MAP(KB_RU, KB_US, gsckbd_keydesc_ru), - KBD_MAP(KB_UA, KB_US, gsckbd_keydesc_ua), - KBD_MAP(KB_SG, KB_US, gsckbd_keydesc_sg), - KBD_MAP(KB_SG | KB_NODEAD, KB_SG, gsckbd_keydesc_sg_nodead), - KBD_MAP(KB_SF, KB_SG, gsckbd_keydesc_sf), - KBD_MAP(KB_SF | KB_NODEAD, KB_SF, gsckbd_keydesc_sg_nodead), - KBD_MAP(KB_PT, KB_US, gsckbd_keydesc_pt), - KBD_MAP(KB_LT, KB_US, gsckbd_keydesc_lt), - KBD_MAP(KB_LA, KB_US, gsckbd_keydesc_la), - KBD_MAP(KB_BR, KB_US, gsckbd_keydesc_br), - KBD_MAP(KB_TR, KB_US, gsckbd_keydesc_tr), - KBD_MAP(KB_TR | KB_NODEAD, KB_TR, gsckbd_keydesc_tr_nodead), - KBD_MAP(KB_PL, KB_US, gsckbd_keydesc_pl), - KBD_MAP(KB_HU, KB_US, gsckbd_keydesc_hu), - KBD_MAP(KB_SI, KB_US, gsckbd_keydesc_si), - KBD_MAP(KB_CF, KB_US, gsckbd_keydesc_cf), - KBD_MAP(KB_CF | KB_NODEAD, KB_CF, gsckbd_keydesc_cf_nodead), - KBD_MAP(KB_LV, KB_US, gsckbd_keydesc_lv), - KBD_MAP(KB_NL, KB_US, gsckbd_keydesc_nl), - KBD_MAP(KB_NL | KB_NODEAD, KB_NL, gsckbd_keydesc_nl_nodead), -#endif /* WSKBD_NO_INTL_LAYOUTS */ - KBD_MAP(KB_US | KB_MACHDEP, KB_US, gsckbd_keydesc_precisionbook), - {0, 0, 0, 0} -}; - -#undef KBD_MAP -#undef KC diff --git a/sys/arch/hppa/gsc/gsckbdmap.h b/sys/arch/hppa/gsc/gsckbdmap.h deleted file mode 100644 index 83ec0b9119f..00000000000 --- a/sys/arch/hppa/gsc/gsckbdmap.h +++ /dev/null @@ -1,29 +0,0 @@ -/* $OpenBSD: gsckbdmap.h,v 1.1 2003/01/31 22:50:19 miod Exp $ */ -/* - * Copyright (c) 2003, Miodrag Vallat. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ - -extern const struct wscons_keydesc gsckbd_keydesctab[]; diff --git a/sys/arch/hppa/gsc/gsckbdvar.h b/sys/arch/hppa/gsc/gsckbdvar.h deleted file mode 100644 index 6e72a0dc16c..00000000000 --- a/sys/arch/hppa/gsc/gsckbdvar.h +++ /dev/null @@ -1,29 +0,0 @@ -/* $OpenBSD: gsckbdvar.h,v 1.1 2003/01/31 22:50:19 miod Exp $ */ -/* - * Copyright (c) 2003, Miodrag Vallat. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ - -int gsckbd_cnattach(pckbc_tag_t, int); diff --git a/sys/arch/hppa/gsc/makemap.awk b/sys/arch/hppa/gsc/makemap.awk deleted file mode 100644 index f2556a275fd..00000000000 --- a/sys/arch/hppa/gsc/makemap.awk +++ /dev/null @@ -1,359 +0,0 @@ -#! /usr/bin/awk -f -# $OpenBSD: makemap.awk,v 1.6 2005/05/12 16:21:23 miod Exp $ -# -# Copyright (c) 2003, 2005, Miodrag Vallat. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# This script attempts to convert, with minimal hacks and losses, the -# regular PS/2 keyboard (pckbd) layout tables into GSC keyboard (gsckbd) -# layout tables, as almost all scancodes are completely different in the -# GSC world. -# - -BEGIN { - rcsid = "$OpenBSD: makemap.awk,v 1.6 2005/05/12 16:21:23 miod Exp $" - ifdepth = 0 - ignore = 0 - mapnum = 0 - declk = 0 - - # PS/2 id -> GSCKBD conversion table, or "sanity lossage 101" - for (i = 0; i < 256; i++) - conv[i] = -1 - - conv[1] = 118 - conv[2] = 22 - conv[3] = 30 - conv[4] = 38 - conv[5] = 37 - conv[6] = 46 - conv[7] = 54 - conv[8] = 61 - conv[9] = 62 - conv[10] = 70 - conv[11] = 69 - conv[12] = 78 - conv[13] = 85 - conv[14] = 102 - conv[15] = 13 - conv[16] = 21 - conv[17] = 29 - conv[18] = 36 - conv[19] = 45 - conv[20] = 44 - conv[21] = 53 - conv[22] = 60 - conv[23] = 67 - conv[24] = 68 - conv[25] = 77 - conv[26] = 84 - conv[27] = 91 - conv[28] = 90 - conv[29] = 20 - conv[30] = 28 - conv[31] = 27 - conv[32] = 35 - conv[33] = 43 - conv[34] = 52 - conv[35] = 51 - conv[36] = 59 - conv[37] = 66 - conv[38] = 75 - conv[39] = 76 - conv[40] = 82 - conv[41] = 14 - conv[42] = 18 - conv[43] = 93 - conv[44] = 26 - conv[45] = 34 - conv[46] = 33 - conv[47] = 42 - conv[48] = 50 - conv[49] = 49 - conv[50] = 58 - conv[51] = 65 - conv[52] = 73 - conv[53] = 74 - conv[54] = 89 - conv[55] = 124 - conv[56] = 17 - conv[57] = 41 - conv[58] = 88 - conv[59] = 5 - conv[60] = 6 - conv[61] = 4 - conv[62] = 12 - conv[63] = 3 - conv[64] = 11 - conv[65] = 131 - conv[66] = 10 - conv[67] = 1 - conv[68] = 9 - conv[69] = 119 - conv[70] = 126 - conv[71] = 108 - conv[72] = 117 - conv[73] = 125 - conv[74] = 123 - conv[75] = 107 - conv[76] = 115 - conv[77] = 116 - conv[78] = 121 - conv[79] = 105 - conv[80] = 114 - conv[81] = 122 - conv[82] = 112 - conv[83] = 113 - conv[86] = 97 - conv[87] = 120 - conv[88] = 7 - # 112 used by jp - # 115 used by jp and br - # 121 used by jp - # 123 used by jp - # 125 used by jp - conv[127] = 127 - conv[156] = 218 - conv[157] = 148 - # Print Screen produces E0 12 E0 7C when pressed, then E0 7C E0 12 - # when released. Ignore the E0 12 code and match only on E0 7C - conv[170] = 252 - conv[181] = 202 - conv[184] = 145 - conv[198] = 254 - conv[199] = 236 - conv[200] = 245 - conv[201] = 253 - conv[203] = 235 - conv[205] = 244 - conv[207] = 233 - conv[208] = 242 - conv[209] = 250 - conv[210] = 240 - conv[211] = 113 -} -NR == 1 { - VERSION = $0 - gsub("\\$", "", VERSION) - gsub("\\$", "", rcsid) - - printf("/*\t\$OpenBSD\$\t*/\n\n") - printf("/*\n") - printf(" * THIS FILE IS AUTOMAGICALLY GENERATED. DO NOT EDIT.\n") - printf(" *\n") - printf(" * generated by:\n") - printf(" *\t%s\n", rcsid) - printf(" * generated from:\n") - printf(" */\n") - print VERSION - - next -} - -# -# A very limited #if ... #endif parser. We only want to correctly detect -# ``#if 0'' constructs, so as not to process their contents. This is necessary -# since our output is out-of-order from our input. -# -# Note that this does NOT handle ``#ifdef notyet'' correctly - please only use -# ``#if 0'' constructs in the input. -# - -/^#if/ { - ignores[ifdepth] = ignore - if ($2 == "0") - ignore = 1 - else - ignore = 0 - ifdepth++ - if (ignore) - next -} -/^#endif/ { - oldignore = ignore - ifdepth-- - ignore = ignores[ifdepth] - ignores[ifdepth] = 0 - if (oldignore) - next -} - -$1 == "#include" { - if (ignore) - next - if ($2 == "<dev/pckbc/wskbdmap_mfii.h>") - print "#include <hppa/gsc/gsckbdmap.h>" - else - printf("#include %s\n", $2) - - next -} -$1 == "#define" || $1 == "#undef" { - if (ignore) - next - print $0 - next -} - -# Don't bother converting the DEC LK layout. -/declk\[/ { - declk = 1 - next -} -/declk/ { - next -} - -/pckbd/ { - if (ignore) - next - gsub("pckbd", "gsckbd", $0) - print $0 - next -} - -/KC/ { - if (ignore) - next - - if (declk) - next - - sidx = substr($1, 4, length($1) - 5) - orig = int(sidx) - id = conv[orig] - - # 183 is another Print Screen... - if (orig == 183) - next - - if (id == -1) { - printf("/* initially KC(%d),", orig) - for (f = 2; f <= NF; f++) { - if ($f != "/*" && $f != "*/") - printf("\t%s", $f) - } - printf("\t*/\n") - } else { - lines[id] = sprintf(" KC(%d),\t", id) - # - # This makes sure that the non-comment part of the output - # ends up with a trailing comma. This is necessary since - # the last line of an input block might not have a trailing - # comma, but might not be the last line of an output block - # due to sorting. - # - comma = 0 - for (f = 2; f <= NF; f++) { - l = length($f) - if ($f == "/*") - comma++ - if (comma == 0 && substr($f, l) != ",") { - lines[id] = sprintf("%s%s,", lines[id], $f) - l++ - } else { - lines[id] = sprintf("%s%s", lines[id], $f) - } - if (comma == 0 && f != NF) { - if (l < 2 * 8) - lines[id] = lines[id] "\t" - if (l < 8) - lines[id] = lines[id] "\t" - } - if ($f == "*/") - comma-- - } - } - - next -} -/};/ { - if (ignore) - next - - if (declk) { - declk = 0 - next - } - - for (i = 0; i < 256; i++) - if (lines[i]) { - print lines[i] - lines[i] = "" - } - - if (mapnum == 0) { - # Add 241 to the US map... - print " KC(241),\tKS_Delete" - print $0 - print "\nstatic const keysym_t gsckbd_keydesc_precisionbook[] = {" - print "/* pos command\t\tnormal shifted */" - print " KC(7), KS_Cmd_Screen0,\tKS_f1," - print " KC(15), KS_Cmd_Screen1,\tKS_f2," - print " KC(23), KS_Cmd_Screen2,\tKS_f3," - print " KC(31), KS_Cmd_Screen3,\tKS_f4," - print " KC(39), KS_Cmd_Screen4,\tKS_f5," - print " KC(47), KS_Cmd_Screen5,\tKS_f6," - print " KC(55), KS_Cmd_Screen6,\tKS_f7," - print " KC(63), KS_Cmd_Screen7,\tKS_f8," - print " KC(71), KS_Cmd_Screen8,\tKS_f9," - print " KC(79), KS_Cmd_Screen9,\tKS_f10," - print " KC(86), KS_Cmd_Screen10,\tKS_f11," - print " KC(94), KS_Cmd_Screen11,\tKS_f12," - print " KC(8), KS_Cmd_Debugger,\tKS_Escape," - print " KC(87),\t\t\tKS_Print_Screen," - print " KC(92),\t\t\tKS_backslash,\tKS_bar," - print " KC(96),\t\t\tKS_KP_Down,\tKS_KP_2," - print " KC(95),\t\t\tKS_Hold_Screen," - print " KC(97),\t\t\tKS_KP_Left,\tKS_KP_4," - print " KC(98),\t\t\tKS_Pause, /* Break */" - print " KC(99),\t\t\tKS_KP_Up,\tKS_KP_8," - print " KC(100),\t\t\tKS_KP_Delete,\tKS_KP_Decimal," - print " KC(101),\t\t\tKS_KP_End,\tKS_KP_1," - print " KC(103),\t\t\tKS_KP_Insert,\tKS_KP_0," - print " KC(106),\t\t\tKS_KP_Right,\tKS_KP_6," - print " KC(109),\t\t\tKS_KP_Next,\tKS_KP_3," - print " KC(110),\t\t\tKS_KP_Home,\tKS_KP_7," - print " KC(111),\t\t\tKS_KP_Prior,\tKS_KP_9," - print " KC(20),\t\t\tKS_Caps_Lock," - print " KC(17), KS_Cmd1,\t\tKS_Control_L," - print " KC(88), KS_Cmd1,\t\tKS_Control_R," - print " KC(25), KS_Cmd2,\t\tKS_Alt_L," - print " KC(57), KS_Cmd2,\t\tKS_Alt_R,\tKS_Multi_key," - print " KC(139),\t\t\tKS_Meta_L," - print " KC(140),\t\t\tKS_Meta_R," - } - mapnum++ -} -/{0, 0, 0, 0}/ { - printf("\tKBD_MAP(KB_US | KB_MACHDEP,\tKB_US,\tgsckbd_keydesc_precisionbook),\n"); -} -{ - if (ignore) - next - if (declk) - next - print $0 -} |