diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-03-01 03:43:13 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-03-01 03:43:13 +0000 |
commit | 38b04d62924eb4ea0b5f768f62e7cfb0282a13b9 (patch) | |
tree | a51b90f171f81bce7e4956d82109af7eb3dd2fd3 /sys | |
parent | f94a5d516cec609ccaaefe698d289953ceb782ad (diff) |
Add CTRL-ALT-DEL machine reset support, like PCVT had, enabled by the
machdep.kbdreset sysctl as configured in /etc/sysctl.conf.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pckbc/wskbdmap_mfii.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ukbdmap.c | 4 | ||||
-rw-r--r-- | sys/dev/wscons/wskbd.c | 10 | ||||
-rw-r--r-- | sys/dev/wscons/wsksymdef.h | 3 |
4 files changed, 15 insertions, 6 deletions
diff --git a/sys/dev/pckbc/wskbdmap_mfii.c b/sys/dev/pckbc/wskbdmap_mfii.c index ad9e2f3c135..a5a5e76f102 100644 --- a/sys/dev/pckbc/wskbdmap_mfii.c +++ b/sys/dev/pckbc/wskbdmap_mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbdmap_mfii.c,v 1.3 2001/02/11 19:14:05 aaron Exp $ */ +/* $OpenBSD: wskbdmap_mfii.c,v 1.4 2001/03/01 03:43:12 aaron Exp $ */ /* $NetBSD: wskbdmap_mfii.c,v 1.15 2000/05/19 16:40:04 drochner Exp $ */ /*- @@ -150,7 +150,7 @@ static const keysym_t pckbd_keydesc_us[] = { KC(208), KS_Down, KC(209), KS_Cmd_ScrollFwd, KS_Next, KC(210), KS_Insert, - KC(211), KS_KP_Delete, + KC(211), KS_Cmd_KbdReset, KS_KP_Delete, KC(219), KS_Meta_L, KC(220), KS_Meta_R, KC(221), KS_Menu, diff --git a/sys/dev/usb/ukbdmap.c b/sys/dev/usb/ukbdmap.c index 6939a8942f5..b97c41f2f99 100644 --- a/sys/dev/usb/ukbdmap.c +++ b/sys/dev/usb/ukbdmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ukbdmap.c,v 1.4 2001/02/11 19:14:06 aaron Exp $ */ +/* $OpenBSD: ukbdmap.c,v 1.5 2001/03/01 03:43:12 aaron Exp $ */ /* $NetBSD: ukbdmap.c,v 1.5 2000/04/27 15:26:49 augustss Exp $ */ /* @@ -143,7 +143,7 @@ Static const keysym_t ukbd_keydesc_us[] = { KC(96), KS_KP_Up, KS_KP_8, KC(97), KS_KP_Prior, KS_KP_9, KC(98), KS_KP_Insert, KS_KP_0, - KC(99), KS_KP_Delete, KS_KP_Decimal, + KC(99), KS_Cmd_KbdReset, KS_KP_Delete, KS_KP_Decimal, KC(100), KS_backslash, KS_bar, KC(101), KS_Menu, /* ... many unmapped keys ... */ diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index 40a99327a9c..53382692e25 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbd.c,v 1.9 2001/02/11 19:14:06 aaron Exp $ */ +/* $OpenBSD: wskbd.c,v 1.10 2001/03/01 03:43:12 aaron Exp $ */ /* $NetBSD: wskbd.c,v 1.38 2000/03/23 07:01:47 thorpej Exp $ */ /* @@ -241,6 +241,8 @@ struct cfattach wskbd_ca = { extern struct cfdriver wskbd_cd; +extern int kbd_reset; + #ifndef WSKBD_DEFAULT_BELL_PITCH #define WSKBD_DEFAULT_BELL_PITCH 1500 /* 1500Hz */ #endif @@ -1391,6 +1393,12 @@ internal_command(sc, type, ksym, ksym2) case KS_Cmd_ResetClose: wsdisplay_reset(sc->sc_displaydv, WSDISPLAY_RESETCLOSE); return (1); + case KS_Cmd_KbdReset: + if (kbd_reset == 1) { + kbd_reset = 0; + psignal(initproc, SIGUSR1); + } + return (1); case KS_Cmd_BacklightOn: case KS_Cmd_BacklightOff: case KS_Cmd_BacklightToggle: diff --git a/sys/dev/wscons/wsksymdef.h b/sys/dev/wscons/wsksymdef.h index 5ec6f310105..f43e9444acf 100644 --- a/sys/dev/wscons/wsksymdef.h +++ b/sys/dev/wscons/wsksymdef.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wsksymdef.h,v 1.7 2001/02/11 19:14:06 aaron Exp $ */ +/* $OpenBSD: wsksymdef.h,v 1.8 2001/03/01 03:43:12 aaron Exp $ */ /* $NetBSD: wsksymdef.h,v 1.34.4.1 2000/07/07 09:49:54 hannken Exp $ */ /*- @@ -439,6 +439,7 @@ #define KS_Cmd_ContrastRotate 0xf42b #define KS_Cmd_ScrollBack 0xf42c #define KS_Cmd_ScrollFwd 0xf42d +#define KS_Cmd_KbdReset 0xf42e /* * Group 5 (internal) |