diff options
-rw-r--r-- | sys/arch/sparc/dev/z8530kbd.c | 14 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/z8530kbd.c | 14 | ||||
-rw-r--r-- | sys/dev/sun/sunkbd.c | 3 | ||||
-rw-r--r-- | sys/dev/sun/sunkbdvar.h | 3 |
4 files changed, 7 insertions, 27 deletions
diff --git a/sys/arch/sparc/dev/z8530kbd.c b/sys/arch/sparc/dev/z8530kbd.c index 1738294377c..cad933dd4f1 100644 --- a/sys/arch/sparc/dev/z8530kbd.c +++ b/sys/arch/sparc/dev/z8530kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530kbd.c,v 1.12 2009/01/11 16:12:14 miod Exp $ */ +/* $OpenBSD: z8530kbd.c,v 1.13 2009/01/12 21:11:56 miod Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -1110,15 +1110,5 @@ zskbd_cngetc(v, type, data) c = *zst->zst_cs->cs_reg_data; splx(s); - switch (c) { - case SKBD_RSP_IDLE: - *type = WSCONS_EVENT_ALL_KEYS_UP; - *data = 0; - break; - default: - *type = (c & 0x80) ? - WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN; - *data = c & 0x7f; - break; - } + sunkbd_decode(c, type, data); } diff --git a/sys/arch/sparc64/dev/z8530kbd.c b/sys/arch/sparc64/dev/z8530kbd.c index 9509e79797e..0b7c99e58e0 100644 --- a/sys/arch/sparc64/dev/z8530kbd.c +++ b/sys/arch/sparc64/dev/z8530kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530kbd.c,v 1.22 2009/01/11 16:12:15 miod Exp $ */ +/* $OpenBSD: z8530kbd.c,v 1.23 2009/01/12 21:11:58 miod Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -1093,15 +1093,5 @@ zskbd_cngetc(v, type, data) c = *zst->zst_cs->cs_reg_data; splx(s); - switch (c) { - case SKBD_RSP_IDLE: - *type = WSCONS_EVENT_ALL_KEYS_UP; - *data = 0; - break; - default: - *type = (c & 0x80) ? - WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN; - *data = c & 0x7f; - break; - } + sunkbd_decode(c, type, data); } diff --git a/sys/dev/sun/sunkbd.c b/sys/dev/sun/sunkbd.c index 9355a52ef69..a15bde3aede 100644 --- a/sys/dev/sun/sunkbd.c +++ b/sys/dev/sun/sunkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunkbd.c,v 1.24 2009/01/12 17:45:37 miod Exp $ */ +/* $OpenBSD: sunkbd.c,v 1.25 2009/01/12 21:11:58 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -57,7 +57,6 @@ #endif void sunkbd_bell(struct sunkbd_softc *, u_int, u_int, u_int); -void sunkbd_decode(u_int8_t, u_int *, int *); void sunkbd_decode5(u_int8_t, u_int *, int *); int sunkbd_enable(void *, int); int sunkbd_getleds(struct sunkbd_softc *); diff --git a/sys/dev/sun/sunkbdvar.h b/sys/dev/sun/sunkbdvar.h index 79e0805484b..656fe3c7116 100644 --- a/sys/dev/sun/sunkbdvar.h +++ b/sys/dev/sun/sunkbdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sunkbdvar.h,v 1.14 2009/01/12 17:45:37 miod Exp $ */ +/* $OpenBSD: sunkbdvar.h,v 1.15 2009/01/12 21:11:58 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -64,6 +64,7 @@ extern struct wskbd_accessops sunkbd_accessops; void sunkbd_attach(struct sunkbd_softc *, struct wskbddev_attach_args *); void sunkbd_bellstop(void *); +void sunkbd_decode(u_int8_t, u_int *, int *); void sunkbd_input(struct sunkbd_softc *, u_int8_t *, u_int); void sunkbd_raw(struct sunkbd_softc *, u_int8_t); int sunkbd_setclick(struct sunkbd_softc *, int); |