diff options
author | kato <kato@FreeBSD.org> | 1997-10-02 09:14:33 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1997-10-02 09:14:33 +0000 |
commit | f0fb08b13f8d4c949bf3c9c2854b1e994b9ad19d (patch) | |
tree | 53b4e48be295a046c572577d41d5495a5ce4aebc /sys/pc98 | |
parent | 295181cc8307ff02164a63307e4927fbc24dbff7 (diff) | |
download | FreeBSD-src-f0fb08b13f8d4c949bf3c9c2854b1e994b9ad19d.zip FreeBSD-src-f0fb08b13f8d4c949bf3c9c2854b1e994b9ad19d.tar.gz |
Synchronize with sys/i386/isa/syscons.c and syscons.h revisions 1.234
and 1.34, respectively.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/pc98/syscons.c | 19 | ||||
-rw-r--r-- | sys/pc98/pc98/syscons.h | 19 |
2 files changed, 25 insertions, 13 deletions
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index fa754b3..1b608ea 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.57 1997/09/27 12:55:57 kato Exp $ + * $Id: syscons.c,v 1.58 1997/09/28 05:51:49 kato Exp $ */ #include "sc.h" @@ -1620,13 +1620,19 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) case KDSKBMODE: /* set keyboard mode */ switch (*data) { case K_RAW: /* switch to RAW scancode mode */ + scp->status &= ~KBD_CODE_MODE; scp->status |= KBD_RAW_MODE; return 0; + case K_CODE: /* switch to CODE mode */ + scp->status &= ~KBD_RAW_MODE; + scp->status |= KBD_CODE_MODE; + return 0; + case K_XLATE: /* switch to XLT ascii mode */ if (scp == cur_console && scp->status & KBD_RAW_MODE) shfts = ctls = alts = agrs = metas = 0; - scp->status &= ~KBD_RAW_MODE; + scp->status &= ~(KBD_RAW_MODE | KBD_CODE_MODE); return 0; default: return EINVAL; @@ -1634,7 +1640,8 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) /* NOT REACHED */ case KDGKBMODE: /* get keyboard mode */ - *data = (scp->status & KBD_RAW_MODE) ? K_RAW : K_XLATE; + *data = (scp->status & KBD_RAW_MODE) ? K_RAW : + ((scp->status & KBD_CODE_MODE) ? K_CODE : K_XLATE); return 0; case KDMKTONE: /* sound the bell */ @@ -2261,7 +2268,8 @@ exchange_scr(void) if ((old_scp->status & UNKNOWN_MODE) && crtc_vga) load_palette(palette); #endif - if (old_scp->status & KBD_RAW_MODE || new_scp->status & KBD_RAW_MODE) + if (old_scp->status & KBD_RAW_MODE || new_scp->status & KBD_RAW_MODE || + old_scp->status & KBD_CODE_MODE || new_scp->status & KBD_CODE_MODE) shfts = ctls = alts = agrs = metas = 0; update_leds(new_scp->status); delayed_next_scr = FALSE; @@ -3856,6 +3864,9 @@ next_code: break; } + if (cur_console->status & KBD_CODE_MODE) + return (keycode | (scancode & 0x80)); + /* if scroll-lock pressed allow history browsing */ if (cur_console->history && cur_console->status & SLKED) { int i; diff --git a/sys/pc98/pc98/syscons.h b/sys/pc98/pc98/syscons.h index 9e3c212..7540ab4 100644 --- a/sys/pc98/pc98/syscons.h +++ b/sys/pc98/pc98/syscons.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.h,v 1.16 1997/08/26 15:09:36 kato Exp $ + * $Id: syscons.h,v 1.17 1997/09/05 10:17:30 kato Exp $ */ #ifndef _PC98_PC98_SYSCONS_H_ @@ -56,14 +56,15 @@ #define LED_MASK 0x00007 #define UNKNOWN_MODE 0x00010 #define KBD_RAW_MODE 0x00020 -#define SWITCH_WAIT_REL 0x00040 -#define SWITCH_WAIT_ACQ 0x00080 -#define BUFFER_SAVED 0x00100 -#define CURSOR_ENABLED 0x00200 -#define MOUSE_ENABLED 0x00400 -#define MOUSE_MOVED 0x00800 -#define MOUSE_CUTTING 0x01000 -#define MOUSE_VISIBLE 0x02000 +#define KBD_CODE_MODE 0x00040 +#define SWITCH_WAIT_REL 0x00080 +#define SWITCH_WAIT_ACQ 0x00100 +#define BUFFER_SAVED 0x00200 +#define CURSOR_ENABLED 0x00400 +#define MOUSE_ENABLED 0x00800 +#define MOUSE_MOVED 0x01000 +#define MOUSE_CUTTING 0x02000 +#define MOUSE_VISIBLE 0x04000 /* configuration flags */ #define VISUAL_BELL 0x00001 |