summaryrefslogtreecommitdiff
path: root/sys/dev/wscons
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-10 19:42:07 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-10 19:42:07 +0000
commit6dfdbf4e5f4f02783bc3d43bcc87b2827fbf44bd (patch)
tree948170cc776f70028d003e724369e96edf6f9483 /sys/dev/wscons
parent660a9e91edc56a0125f26045a71659394f9695dd (diff)
sync w/ netbsd; aaron@ ok
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r--sys/dev/wscons/wscons_callbacks.h4
-rw-r--r--sys/dev/wscons/wsconsio.h17
-rw-r--r--sys/dev/wscons/wsdisplay.c91
-rw-r--r--sys/dev/wscons/wsdisplay_compat_usl.c12
-rw-r--r--sys/dev/wscons/wsdisplayvar.h6
-rw-r--r--sys/dev/wscons/wsemul_vt100.c4
-rw-r--r--sys/dev/wscons/wsemul_vt100_chars.c10
-rw-r--r--sys/dev/wscons/wskbd.c62
-rw-r--r--sys/dev/wscons/wsksymdef.h28
9 files changed, 191 insertions, 43 deletions
diff --git a/sys/dev/wscons/wscons_callbacks.h b/sys/dev/wscons/wscons_callbacks.h
index 4eeee0ea451..417bf6eeb3f 100644
--- a/sys/dev/wscons/wscons_callbacks.h
+++ b/sys/dev/wscons/wscons_callbacks.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wscons_callbacks.h,v 1.2 2000/08/01 13:51:17 mickey Exp $ */
+/* $OpenBSD: wscons_callbacks.h,v 1.3 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wscons_callbacks.h,v 1.12 2000/03/06 21:37:16 thorpej Exp $ */
/*
@@ -52,6 +52,8 @@ void wsdisplay_set_cons_kbd __P((int (*get)(dev_t),
void (*poll)(dev_t, int),
void (*bell)(dev_t, u_int, u_int, u_int)));
void wsdisplay_unset_cons_kbd __P((void));
+struct wsdisplay_param;
+int wsdisplay_param __P((struct device*, u_long, struct wsdisplay_param*));
/*
* Calls to the keyboard interface from the glue code.
diff --git a/sys/dev/wscons/wsconsio.h b/sys/dev/wscons/wsconsio.h
index a268c69c7ca..457764baffc 100644
--- a/sys/dev/wscons/wsconsio.h
+++ b/sys/dev/wscons/wsconsio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsconsio.h,v 1.4 2001/02/05 23:39:01 matthieu Exp $ */
+/* $OpenBSD: wsconsio.h,v 1.5 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wsconsio.h,v 1.31.2.1 2000/07/07 09:49:17 hannken Exp $ */
/*
@@ -225,6 +225,7 @@ struct wsmouse_calibcoords {
#define WSDISPLAY_TYPE_VAX_MONO 21 /* DEC VS2K/VS3100 mono */
#define WSDISPLAY_TYPE_SB_P9100 22 /* Tadpole SPARCbook P9100 */
#define WSDISPLAY_TYPE_EGA 23 /* (generic) EGA */
+#define WSDISPLAY_TYPE_DCPVR 24 /* Dreamcast PowerVR */
/* Basic display information. Not applicable to all display types. */
struct wsdisplay_fbinfo {
@@ -303,6 +304,8 @@ struct wsdisplay_font {
#define WSDISPLAY_FONTENC_ISO 0
#define WSDISPLAY_FONTENC_IBM 1
#define WSDISPLAY_FONTENC_PCVT 2
+#define WSDISPLAY_FONTENC_ISO7 3 /* greek */
+#define WSDISPLAY_FONTENC_SONY 4
int fontwidth, fontheight, stride;
int bitorder, byteorder;
#define WSDISPLAY_FONTORDER_KNOWN 0 /* i.e, no need to convert */
@@ -340,6 +343,18 @@ struct wsdisplay_kbddata {
};
#define _O_WSDISPLAYIO_SETKEYBOARD _IOWR('W', 81, struct wsdisplay_kbddata)
+/* Misc control. Not applicable to all display types. */
+struct wsdisplay_param {
+ int param;
+#define WSDISPLAYIO_PARAM_BACKLIGHT 1
+#define WSDISPLAYIO_PARAM_BRIGHTNESS 2
+#define WSDISPLAYIO_PARAM_CONTRAST 3
+ int min, max, curval;
+ int reserved[4];
+};
+#define WSDISPLAYIO_GETPARAM _IOWR('W', 82, struct wsdisplay_param)
+#define WSDISPLAYIO_SETPARAM _IOWR('W', 83, struct wsdisplay_param)
+
/* XXX NOT YET DEFINED */
/* Mapping information retrieval. */
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index d6a5861032b..7edd2cbaeef 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.11 2001/02/09 18:50:50 aaron Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.12 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
@@ -100,8 +100,6 @@ struct wsscreen *wsscreen_attach __P((struct wsdisplay_softc *, int,
const struct wsscreen_descr *, void *,
int, int, long));
void wsscreen_detach __P((struct wsscreen *));
-static const struct wsscreen_descr *
-wsdisplay_screentype_pick __P((const struct wsscreen_list *, const char *));
int wsdisplay_addscreen __P((struct wsdisplay_softc *, int, const char *, const char *));
static void wsdisplay_shutdownhook __P((void *));
static void wsdisplay_addscreen_print __P((struct wsdisplay_softc *, int, int));
@@ -120,7 +118,7 @@ struct wsdisplay_softc {
const struct wsscreen_list *sc_scrdata;
struct wsscreen *sc_scr[WSDISPLAY_MAXSCREEN];
- int sc_focusidx;
+ int sc_focusidx; /* available only if sc_focus isn't null */
struct wsscreen *sc_focus;
int sc_isconsole;
@@ -300,7 +298,7 @@ wsscreen_detach(scr)
free(scr, M_DEVBUF);
}
-static const struct wsscreen_descr *
+const struct wsscreen_descr *
wsdisplay_screentype_pick(scrdata, name)
const struct wsscreen_list *scrdata;
const char *name;
@@ -935,6 +933,17 @@ wsdisplayioctl(dev, cmd, data, flag, p)
}
int
+wsdisplay_param(dev, cmd, dp)
+ struct device *dev;
+ u_long cmd;
+ struct wsdisplay_param *dp;
+{
+ struct wsdisplay_softc *sc = (struct wsdisplay_softc *)dev;
+ return ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, cmd,
+ (caddr_t)dp, 0, NULL));
+}
+
+int
wsdisplay_internal_ioctl(sc, scr, cmd, data, flag, p)
struct wsdisplay_softc *sc;
struct wsscreen *scr;
@@ -983,6 +992,10 @@ wsdisplay_internal_ioctl(sc, scr, cmd, data, flag, p)
scr->scr_flags |= SCR_GRAPHICS;
} else if (d == WSDISPLAYIO_MODE_EMUL)
return (EINVAL);
+
+ (void)(*sc->sc_accessops->ioctl)(sc->sc_accesscookie, cmd, data,
+ flag, p);
+
return (0);
#undef d
@@ -1171,9 +1184,14 @@ wsdisplaystart(tp)
{
struct wsdisplay_softc *sc;
struct wsscreen *scr;
- int s, n;
+ int s, n, unit;
u_char *buf;
+ unit = WSDISPLAYUNIT(tp->t_dev);
+ if (unit >= wsdisplay_cd.cd_ndevs ||
+ (sc = wsdisplay_cd.cd_devs[unit]) == NULL)
+ return;
+
s = spltty();
if (tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP)) {
splx(s);
@@ -1182,7 +1200,6 @@ wsdisplaystart(tp)
if (tp->t_outq.c_cc == 0 && tp->t_wsel.si_selpid == 0)
goto low;
- sc = wsdisplay_cd.cd_devs[WSDISPLAYUNIT(tp->t_dev)];
scr = sc->sc_scr[WSDISPLAYSCREEN(tp->t_dev)];
if (scr->scr_hold_screen) {
tp->t_state |= TS_TIMEOUT;
@@ -1395,7 +1412,7 @@ wsdisplay_switch3(arg, error, waitok)
if (error) {
/* try to recover, avoid recursion */
- if (sc->sc_oldscreen == -1) {
+ if (sc->sc_oldscreen == WSDISPLAY_NULLSCREEN) {
printf("wsdisplay_switch3: giving up\n");
sc->sc_focus = 0;
#ifdef WSDISPLAY_COMPAT_RAWKBD
@@ -1406,7 +1423,7 @@ wsdisplay_switch3(arg, error, waitok)
}
sc->sc_screenwanted = sc->sc_oldscreen;
- sc->sc_oldscreen = -1;
+ sc->sc_oldscreen = WSDISPLAY_NULLSCREEN;
return (wsdisplay_switch1(arg, 0, waitok));
}
@@ -1443,7 +1460,7 @@ wsdisplay_switch2(arg, error, waitok)
if (error) {
/* try to recover, avoid recursion */
- if (sc->sc_oldscreen == -1) {
+ if (sc->sc_oldscreen == WSDISPLAY_NULLSCREEN) {
printf("wsdisplay_switch2: giving up\n");
sc->sc_focus = 0;
sc->sc_flags &= ~SC_SWITCHPENDING;
@@ -1451,7 +1468,7 @@ wsdisplay_switch2(arg, error, waitok)
}
sc->sc_screenwanted = sc->sc_oldscreen;
- sc->sc_oldscreen = -1;
+ sc->sc_oldscreen = WSDISPLAY_NULLSCREEN;
return (wsdisplay_switch1(arg, 0, waitok));
}
@@ -1491,6 +1508,14 @@ wsdisplay_switch1(arg, error, waitok)
}
no = sc->sc_screenwanted;
+ if (no == WSDISPLAY_NULLSCREEN) {
+ sc->sc_flags &= ~SC_SWITCHPENDING;
+ if (!error) {
+ sc->sc_focus = 0;
+ }
+ wakeup(sc);
+ return (error);
+ }
if (no < 0 || no >= WSDISPLAY_MAXSCREEN)
panic("wsdisplay_switch1: invalid screen %d", no);
scr = sc->sc_scr[no];
@@ -1526,12 +1551,14 @@ wsdisplay_switch(dev, no, waitok)
int s, res = 0;
struct wsscreen *scr;
- if (no < 0 || no >= WSDISPLAY_MAXSCREEN || !sc->sc_scr[no])
+ if (no != WSDISPLAY_NULLSCREEN &&
+ (no < 0 || no >= WSDISPLAY_MAXSCREEN || !sc->sc_scr[no]))
return (ENXIO);
s = spltty();
- if (sc->sc_focus && no == sc->sc_focusidx) {
+ if ((sc->sc_focus && no == sc->sc_focusidx) ||
+ (sc->sc_focus == NULL && no == WSDISPLAY_NULLSCREEN)) {
splx(s);
return (0);
}
@@ -1548,7 +1575,7 @@ wsdisplay_switch(dev, no, waitok)
scr = sc->sc_focus;
if (!scr) {
- sc->sc_oldscreen = -1;
+ sc->sc_oldscreen = WSDISPLAY_NULLSCREEN;
return (wsdisplay_switch1(sc, 0, waitok));
} else
sc->sc_oldscreen = sc->sc_focusidx;
@@ -1655,7 +1682,7 @@ wsdisplay_screenstate(sc, idx)
struct wsdisplay_softc *sc;
int idx;
{
- if (idx >= WSDISPLAY_MAXSCREEN)
+ if (idx < 0 || idx >= WSDISPLAY_MAXSCREEN)
return (EINVAL);
if (!sc->sc_scr[idx])
return (ENXIO);
@@ -1666,7 +1693,7 @@ int
wsdisplay_getactivescreen(sc)
struct wsdisplay_softc *sc;
{
- return (sc->sc_focusidx);
+ return (sc->sc_focus ? sc->sc_focusidx : WSDISPLAY_NULLSCREEN);
}
int
@@ -1677,6 +1704,15 @@ wsscreen_switchwait(sc, no)
struct wsscreen *scr;
int s, res = 0;
+ if (no == WSDISPLAY_NULLSCREEN) {
+ s = spltty();
+ while (sc->sc_focus && res == 0) {
+ res = tsleep(sc, PCATCH, "wswait", 0);
+ }
+ splx(s);
+ return (res);
+ }
+
if (no < 0 || no >= WSDISPLAY_MAXSCREEN)
return (ENXIO);
scr = sc->sc_scr[no];
@@ -1762,9 +1798,19 @@ wsdisplay_pollc(dev, on)
dev_t dev;
int on;
{
+ struct wsdisplay_softc *sc = NULL;
+ int unit = WSDISPLAYUNIT(dev);
+
+ if (unit < wsdisplay_cd.cd_ndevs)
+ sc = wsdisplay_cd.cd_devs[unit];
wsdisplay_cons_pollmode = on;
+ /* notify to fb drivers */
+ if (sc != NULL && sc->sc_accessops->pollc != NULL)
+ (*sc->sc_accessops->pollc)(sc->sc_accesscookie, on);
+
+ /* notify to kbd drivers */
if (wsdisplay_cons_kbd_pollc)
(*wsdisplay_cons_kbd_pollc)(dev, on);
}
@@ -1798,9 +1844,16 @@ wsdisplay_unset_cons_kbd()
void
wsdisplay_switchtoconsole()
{
- if (wsdisplay_console_device != NULL)
- wsdisplay_switch((struct device *)wsdisplay_console_device,
- 0, 0);
+ struct wsdisplay_softc *sc;
+ struct wsscreen *scr;
+
+ if (wsdisplay_console_device != NULL) {
+ sc = wsdisplay_console_device;
+ scr = sc->sc_scr[0];
+ (*sc->sc_accessops->show_screen)(sc->sc_accesscookie,
+ scr->scr_dconf->emulcookie,
+ 0, NULL, NULL);
+}
}
void
diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c
index 633ceff003f..a76c557be7f 100644
--- a/sys/dev/wscons/wsdisplay_compat_usl.c
+++ b/sys/dev/wscons/wsdisplay_compat_usl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay_compat_usl.c,v 1.3 2000/08/01 13:51:18 mickey Exp $ */
+/* $OpenBSD: wsdisplay_compat_usl.c,v 1.4 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wsdisplay_compat_usl.c,v 1.12 2000/03/23 07:01:47 thorpej Exp $ */
/*
@@ -322,9 +322,13 @@ wsdisplay_usl_ioctl1(sc, cmd, data, flag, p)
return (0);
case VT_ACTIVATE:
idx = *(int *)data - 1;
+ if (idx < 0)
+ return (EINVAL);
return (wsdisplay_switch((struct device *)sc, idx, 1));
case VT_WAITACTIVE:
idx = *(int *)data - 1;
+ if (idx < 0)
+ return (EINVAL);
return (wsscreen_switchwait(sc, idx));
case VT_GETSTATE:
#define ss ((struct vt_stat *)data)
@@ -369,11 +373,11 @@ wsdisplay_usl_ioctl2(sc, scr, cmd, data, flag, p)
int flag;
struct proc *p;
{
- int res;
+ int intarg, res;
+ u_long req;
+ void *arg;
struct usl_syncdata *sd;
- int req, intarg;
struct wskbd_bell_data bd;
- void *arg;
switch (cmd) {
case VT_SETMODE:
diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h
index 8eeba2a65a3..e9c08cf2430 100644
--- a/sys/dev/wscons/wsdisplayvar.h
+++ b/sys/dev/wscons/wsdisplayvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplayvar.h,v 1.6 2001/02/08 02:47:12 aaron Exp $ */
+/* $OpenBSD: wsdisplayvar.h,v 1.7 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wsdisplayvar.h,v 1.14.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
@@ -112,6 +112,7 @@ struct wsdisplay_accessops {
void (*) (void *, int, int), void *));
int (*load_font) __P((void *, void *, struct wsdisplay_font *));
void (*scrollback) __P((void *, void *, int));
+ void (*pollc) __P((void *, int));
};
/*
@@ -198,7 +199,10 @@ int wsdisplay_cfg_ioctl __P((struct wsdisplay_softc *sc,
/*
* for general use
*/
+#define WSDISPLAY_NULLSCREEN -1
void wsdisplay_switchtoconsole __P((void));
+const struct wsscreen_descr *
+ wsdisplay_screentype_pick __P((const struct wsscreen_list *, const char *));
/*
* for use by wskbd
diff --git a/sys/dev/wscons/wsemul_vt100.c b/sys/dev/wscons/wsemul_vt100.c
index 4e6b5b1a66e..88955ab7d58 100644
--- a/sys/dev/wscons/wsemul_vt100.c
+++ b/sys/dev/wscons/wsemul_vt100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsemul_vt100.c,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $OpenBSD: wsemul_vt100.c,v 1.3 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wsemul_vt100.c,v 1.13 2000/04/28 21:56:16 mycroft Exp $ */
/*
@@ -162,7 +162,7 @@ wsemul_vt100_cnattach(type, cookie, ccol, crow, defattr)
#define WS_KERNEL_FG WSCOL_WHITE
#endif
#ifndef WS_KERNEL_BG
-#define WS_KERNEL_BG WSCOL_BLACK
+#define WS_KERNEL_BG WSCOL_BLUE
#endif
#ifndef WS_KERNEL_COLATTR
#define WS_KERNEL_COLATTR 0
diff --git a/sys/dev/wscons/wsemul_vt100_chars.c b/sys/dev/wscons/wsemul_vt100_chars.c
index dd4ccbadf61..ec15af2d7fc 100644
--- a/sys/dev/wscons/wsemul_vt100_chars.c
+++ b/sys/dev/wscons/wsemul_vt100_chars.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsemul_vt100_chars.c,v 1.1 2000/05/16 23:49:11 mickey Exp $ */
+/* $OpenBSD: wsemul_vt100_chars.c,v 1.2 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wsemul_vt100_chars.c,v 1.4 1999/02/20 18:20:02 drochner Exp $ */
/*
@@ -41,7 +41,7 @@
#include <dev/wscons/wsemul_vt100var.h>
#include <dev/wscons/unicode.h>
-static u_int16_t decspcgr2uni[128] = {
+static const u_int16_t decspcgr2uni[128] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
@@ -60,7 +60,7 @@ static u_int16_t decspcgr2uni[128] = {
0x2502, 0x2264, 0x2265, 0x03c0, 0x2260, 0x00a3, 0x00b7, 0x007f,
};
-static u_int16_t dectech2uni[128] = {
+static const u_int16_t dectech2uni[128] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
@@ -97,11 +97,11 @@ vt100_initchartables(edp)
vt100_setnrc(edp, 0);
}
-static int nrcovlpos[12] = {
+static const int nrcovlpos[12] = {
0x23, 0x40, 0x5b, 0x5c, 0x5d, 0x5e, /* #@[\]^ */
0x5f, 0x60, 0x7b, 0x7c, 0x7d, 0x7e /* _`{|}~ */
};
-static struct {
+static const struct {
u_int16_t c[12];
} nrctable[] = {
/* british */
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c
index ed4422e18d8..bc92a5bcf68 100644
--- a/sys/dev/wscons/wskbd.c
+++ b/sys/dev/wscons/wskbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wskbd.c,v 1.7 2001/02/08 02:47:12 aaron Exp $ */
+/* $OpenBSD: wskbd.c,v 1.8 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wskbd.c,v 1.38 2000/03/23 07:01:47 thorpej Exp $ */
/*
@@ -215,10 +215,11 @@ int wskbd_set_display __P((struct device *, struct wsmux_softc *));
inline void update_leds __P((struct wskbd_internal *));
inline void update_modifier __P((struct wskbd_internal *, u_int, int, int));
-int internal_command __P((struct wskbd_softc *, u_int *, keysym_t));
+int internal_command __P((struct wskbd_softc *, u_int *, keysym_t, keysym_t));
int wskbd_translate __P((struct wskbd_internal *, u_int, int));
int wskbd_enable __P((struct wskbd_softc *, int));
#if NWSDISPLAY > 0
+void change_displayparam __P((struct wskbd_softc *, int, int, int));
void wskbd_holdscreen __P((struct wskbd_softc *, int));
#endif
@@ -1285,15 +1286,44 @@ update_modifier(id, type, toggle, mask)
}
}
+#if NWSDISPLAY > 0
+void
+change_displayparam(sc, param, updown, wraparound)
+ struct wskbd_softc *sc;
+ int param, updown, wraparound;
+{
+ int res;
+ struct wsdisplay_param dp;
+
+ if (sc->sc_displaydv == NULL)
+ return;
+
+ dp.param = param;
+ res = wsdisplay_param(sc->sc_displaydv, WSDISPLAYIO_GETPARAM, &dp);
+
+ if (res == EINVAL)
+ return; /* no such parameter */
+
+ dp.curval += updown;
+ if (dp.max < dp.curval)
+ dp.curval = wraparound ? dp.min : dp.max;
+ else
+ if (dp.curval < dp.min)
+ dp.curval = wraparound ? dp.max : dp.min;
+ wsdisplay_param(sc->sc_displaydv, WSDISPLAYIO_SETPARAM, &dp);
+}
+#endif
+
int
-internal_command(sc, type, ksym)
+internal_command(sc, type, ksym, ksym2)
struct wskbd_softc *sc;
u_int *type;
- keysym_t ksym;
+ keysym_t ksym, ksym2;
{
switch (ksym) {
case KS_Cmd:
update_modifier(sc->id, *type, 0, MOD_COMMAND);
+ ksym = ksym2;
break;
case KS_Cmd1:
@@ -1359,6 +1389,27 @@ internal_command(sc, type, ksym)
case KS_Cmd_ResetClose:
wsdisplay_reset(sc->sc_displaydv, WSDISPLAY_RESETCLOSE);
return (1);
+ case KS_Cmd_BacklightOn:
+ case KS_Cmd_BacklightOff:
+ case KS_Cmd_BacklightToggle:
+ change_displayparam(sc, WSDISPLAYIO_PARAM_BACKLIGHT,
+ ksym == KS_Cmd_BacklightOff ? -1 : 1,
+ ksym == KS_Cmd_BacklightToggle ? 1 : 0);
+ return (1);
+ case KS_Cmd_BrightnessUp:
+ case KS_Cmd_BrightnessDown:
+ case KS_Cmd_BrightnessRotate:
+ change_displayparam(sc, WSDISPLAYIO_PARAM_BRIGHTNESS,
+ ksym == KS_Cmd_BrightnessDown ? -1 : 1,
+ ksym == KS_Cmd_BrightnessRotate ? 1 : 0);
+ return (1);
+ case KS_Cmd_ContrastUp:
+ case KS_Cmd_ContrastDown:
+ case KS_Cmd_ContrastRotate:
+ change_displayparam(sc, WSDISPLAYIO_PARAM_CONTRAST,
+ ksym == KS_Cmd_ContrastDown ? -1 : 1,
+ ksym == KS_Cmd_ContrastRotate ? 1 : 0);
+ return (1);
#endif
}
return (0);
@@ -1401,7 +1452,8 @@ wskbd_translate(id, type, value)
/* if this key has a command, process it first */
if (sc != NULL && kp->command != KS_voidSymbol)
- iscommand = internal_command(sc, &type, kp->command);
+ iscommand = internal_command(sc, &type, kp->command,
+ kp->group1[0]);
/* Now update modifiers */
switch (kp->group1[0]) {
diff --git a/sys/dev/wscons/wsksymdef.h b/sys/dev/wscons/wsksymdef.h
index aca7df4cf01..ca29402bb27 100644
--- a/sys/dev/wscons/wsksymdef.h
+++ b/sys/dev/wscons/wsksymdef.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsksymdef.h,v 1.5 2001/01/19 18:14:40 deraadt Exp $ */
+/* $OpenBSD: wsksymdef.h,v 1.6 2001/02/10 19:42:06 mickey Exp $ */
/* $NetBSD: wsksymdef.h,v 1.34.4.1 2000/07/07 09:49:54 hannken Exp $ */
/*-
@@ -259,6 +259,11 @@
#define KS_thorn 0xfe
#define KS_ydiaeresis 0xff
+#define KS_Odoubleacute 0x150
+#define KS_odoubleacute 0x151
+#define KS_Udoubleacute 0x170
+#define KS_udoubleacute 0x171
+
/*
* Group Dead (dead accents)
*/
@@ -421,8 +426,17 @@
#define KS_Cmd_Debugger 0xf420
#define KS_Cmd_ResetEmul 0xf421
#define KS_Cmd_ResetClose 0xf422
-#define KS_Cmd_ScrollBack 0xf423
-#define KS_Cmd_ScrollFwd 0xf424
+#define KS_Cmd_BacklightOn 0xf423
+#define KS_Cmd_BacklightOff 0xf424
+#define KS_Cmd_BacklightToggle 0xf425
+#define KS_Cmd_BrightnessUp 0xf426
+#define KS_Cmd_BrightnessDown 0xf427
+#define KS_Cmd_BrightnessRotate 0xf428
+#define KS_Cmd_ContrastUp 0xf429
+#define KS_Cmd_ContrastDown 0xf42a
+#define KS_Cmd_ContrastRotate 0xf42b
+#define KS_Cmd_ScrollBack 0xf42c
+#define KS_Cmd_ScrollFwd 0xf42d
/*
* Group 5 (internal)
@@ -474,6 +488,7 @@
#define KB_SV 0x0900
#define KB_NO 0x0a00
#define KB_ES 0x0b00
+#define KB_HU 0x0c00
#define KB_NODEAD 0x0001
#define KB_DECLK 0x0002 /* DEC LKnnn layout */
@@ -482,6 +497,7 @@
#define KB_DVORAK 0x0010 /* Dvorak layout */
#define KB_METAESC 0x0020 /* generate ESC prefix on ALT-key */
#define KB_IOPENER 0x0040 /* f1-f12 -> ESC,f1-f11 */
+#define KB_MACHDEP 0x0080 /* machine dependent */
#define KB_ENCTAB \
{ KB_USER, "user" }, \
@@ -494,7 +510,8 @@
{ KB_JP, "jp" }, \
{ KB_SV, "sv" }, \
{ KB_NO, "no" }, \
- { KB_ES, "es" }
+ { KB_ES, "es" }, \
+ { KB_HU, "hu" }
#define KB_VARTAB \
{ KB_NODEAD, "nodead" }, \
@@ -503,6 +520,7 @@
{ KB_SWAPCTRLCAPS, "swapctrlcaps" }, \
{ KB_DVORAK, "dvorak" }, \
{ KB_METAESC, "metaesc" }, \
- { KB_IOPENER, "iopener" }
+ { KB_IOPENER, "iopener" }, \
+ { KB_MACHDEP, "machdep" }
#endif /* !_DEV_WSCONS_WSKSYMDEF_H_ */