Translate ascii keycode to help those with azerty keyboard type straight.

This commit is contained in:
dsl 2004-03-13 22:41:37 +00:00
parent 3d9e66400a
commit ae7b924322
3 changed files with 16 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.boot,v 1.13 2003/11/08 00:02:02 dsl Exp $
# $NetBSD: Makefile.boot,v 1.14 2004/03/13 22:41:37 dsl Exp $
S= ${.CURDIR}/../../../../../
@ -58,6 +58,7 @@ CPPFLAGS+= -DDIRECT_SERIAL
CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
CPPFLAGS+= -DSUPPORT_USTARFS
CPPFLAGS+= -DSUPPORT_DOSFS

View File

@ -1,4 +1,4 @@
/* $NetBSD: boot_params.S,v 1.1 2003/10/09 10:29:39 dsl Exp $ */
/* $NetBSD: boot_params.S,v 1.2 2004/03/13 22:41:37 dsl Exp $ */
/* Default boot parameters */
@ -7,3 +7,4 @@
.long 0 /* console device 0 => CONSDEV_PC */
.long 9600 /* serial baud rate */
.space 16 /* md5 boot password */
.space 16 /* keyboard xlat map */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcio.c,v 1.15 2003/10/08 04:25:45 lukem Exp $ */
/* $NetBSD: pcio.c,v 1.16 2004/03/13 22:41:38 dsl Exp $ */
/*
* Copyright (c) 1996, 1997
@ -244,13 +244,21 @@ putchar(c)
int
getchar()
{
#ifdef SUPPORT_SERIAL
int c;
#ifdef SUPPORT_SERIAL
switch (iodev) {
default: /* to make gcc -Wall happy... */
case CONSDEV_PC:
#endif
return (congetc());
c = congetc();
#ifdef CONSOLE_KEYMAP
{
char *cp = strchr(CONSOLE_KEYMAP, c);
if (cp != 0 && cp[1] != 0)
c = cp[1];
}
#endif
return c;
#ifdef SUPPORT_SERIAL
case CONSDEV_COM0:
case CONSDEV_COM1:
@ -333,7 +341,7 @@ awaitkey(timeout, tell)
out:
if (tell)
printf("0\n");
printf("0 \n");
return(c);
}