Subject: Re: Keyboard failure on miniroot 1.1
To: None <thorpej@nas.nasa.gov>
From: Hergo Pape <hergo@wegaop.Boerde.DE>
List: port-hp300
Date: 07/21/1996 14:23:07
Hello,

Jason Thorpe writes:
> On Wed, 24 Jan 1996 14:15:43 +0100 (MET) 
>  Zadok <ml@rz.uni-potsdam.de> wrote:
>  > finally I got the 1.1 miniroot on my harddisk, it booted ... asked me for 
>  > a shell, i pressed enter, but what appeared on my screen was a string 
>  > like this: <H^@^@^@J\> or similar, no key seemed to function properly... 
[...]
> Do you, by chance, have a German keyboard, or is it US ASCII?  We 
> currently support US, UK, and Sweedish.  If you do have a different 
> keyboard, go ahead and make a keyboard map for it (see 
> /sys/arch/hp300/dev/kbd* for details) and I'll be glad to commit it to 
[...]

here is a Fixup for Keyboards other than US, UK or DK. Now you can login
on ITE Console whitout starting X11.

What does this Patch:

- If the Kernel get a unknow Keyboard languagecode (German 0x0F)  then set
  default Keyboard (US ASCII). I'em think that works on all other unknown 
  Keyboards, you have no Keymap for the new Language... Layout is set to
  US_ASCII.

- For German Keyboards, your can define "options  DE_KEYBOARD" in
  arch/hp300/conf/GENERIC File and use German Keymap (no Umlaute).

----- cut here -----

*** kbdmap.h	Sat Jul 13 11:40:54 1996
--- kbdmap.h.orig	Sat Jul 13 08:44:21 1996
***************
*** 50,56 ****
  
  /* kbd_code */
  #define KBD_SPECIAL	0x00		/* user defined */
- #define KBD_DE		0x0F		/* Germany */
  #define KBD_US		0x1F		/* US ASCII */
  #define KBD_UK		0x17		/* United Kingdom */
  #define KBD_SE		0x0e		/* Swedish */
--- 50,55 ----

*** hil_keymaps.c	Sat Jul 13 09:56:22 1996
--- hil_keymaps.c.orig	Sat Jul 13 08:44:07 1996
***************
*** 160,243 ****
  	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL
  };
  
- #ifdef DE_KEYBOARD
- char	de_keymap[] = {
- 	NULL,	'<',	'\\',	ESC,	NULL,	DEL,	NULL,	NULL,  
- 	'\n',	'\t',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,  
- 	NULL,	'\n',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,  
- 	NULL,	'\t',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	'\b',	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	ESC,	'\r',	NULL,	'\n',	'0',	'.',	',',	'+',
- 	'1',	'2',	'3',	'-',	'4',	'5',	'6',	'*',
- 	'7',	'8',	'9',	'/',	'E',	'(',	')',	'^',
- 	'1',	'2',	'3',	'4',	'5',	'6',	'7',	'8',
- 	'9',	'0',	'|',	'\'',	NULL,	'+',	NULL,	NULL,
- 	',',	'.',	'-',	'\040',	'o',	'p',	'k',	'l',
- 	'q',	'w',	'e',	'r',	't',	'z',	'u',	'i',
- 	'a',	's',	'd',	'f',	'g',	'h',	'j',	'm',
- 	'y',	'x',	'c',	'v',	'b',	'n',	NULL,	NULL
- };
- 
- char	de_shiftmap[] = {
- 	NULL,	'>',	'^',	DEL,	NULL,	DEL,	NULL,	NULL,
- 	'\n',	'\t',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	'\n',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	'\t',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	DEL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	ESC,	'\r',	NULL,	'\n',	'0',	'.',	',',	'+',
- 	'1',	'2',	'3',	'-',	'4',	'5',	'6',	'*',
- 	'7',	'8',	'9',	'/',	'`',	'|',	'\\',	'>',
- 	'!',	'\"',	'#',	'$',	'%',	'&',	'/',	'(',
- 	')',	'=',	'?',	'`',	NULL,	'*',	NULL,	NULL,
- 	';',	':',	'_',	'\040',	'O',	'P',	'K',	'L',
- 	'Q',	'W',	'E',	'R',	'T',	'Z',	'U',	'I',
- 	'A',	'S',	'D',	'F',	'G',	'H',	'J',	'M',
- 	'Y',	'X',	'C',	'V',	'B',	'N',	NULL,	NULL
- };
- 
- char	de_ctrlmap[] = {
- 	NULL,	NULL,	NULL,	ESC,	NULL,	DEL,	NULL,	NULL,
- 	'\n',	'\t',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	'\n',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	'\t',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	'\b',	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	ESC,	'\r',	NULL,	'\n',	'0',	'.',	',',	'+',
- 	'1',	'2',	'3',	'-',	'4',	'5',	'6',	'*',
- 	'7',	'8',	'9',	'/',	'E',	'(',	')',	'\036',
- 	'1',	'2',	'3',	'4',	'5',	'6',	'7',	'8',
- 	'9',	'0',	'+',	'\'',	'\033',	'\035',	'*',	'\034',
- 	',',	'.',	'/',	'\040',	'\017',	'\020',	'\013',	'\014',
- 	'\021',	'\027',	'\005',	'\022',	'\024',	'\032',	'\025',	'\011',
- 	'\001',	'\023',	'\004',	'\006',	'\007',	'\010',	'\012',	'\015',
- 	'\031',	'\030',	'\003',	'\026',	'\002',	'\016',	NULL,	NULL
- };
- 
- char	de_ctrlshiftmap[] = {
- 	NULL,	NULL,	NULL,	DEL,	NULL,	DEL,	NULL,	NULL,
- 	'\n',	'\t',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	'\n',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	'\t',	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	DEL,	NULL,
- 	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,	NULL,
- 	ESC,	'\r',	NULL,	'\n',	'0',	'.',	',',	'+',
- 	'1',	'2',	'3',	'-',	'4',	'5',	'6',	'*',
- 	'7',	'8',	'9',	'/',	'`',	'|',	'\034',	'~',
- 	'!',	'\"',	'#',	'$',	'%',	'&',	'\036',	'(',
- 	')',	'=',	'?',	'/',	'{',	'}',	'\000',	'|',
- 	';',	':',	'\037',	'\040',	'\017',	'\020',	'\013',	'\014',
- 	'\021',	'\027',	'\005',	'\022',	'\024',	'\032',	'\025',	'\011',
- 	'\001',	'\023',	'\004',	'\006',	'\007',	'\010',	'\012',	'\015',
- 	'\031',	'\030',	'\003',	'\026',	'\002',	'\016',	NULL,	NULL
- };
- #endif
- 
  #ifdef UK_KEYBOARD
  char	uk_keymap[] = {
  	NULL,	'`',	'<',	ESC,	NULL,	DEL,	NULL,	NULL,  
--- 160,165 ----
***************
*** 403,414 ****
  	us_keymap,	us_shiftmap,	us_ctrlmap,	us_ctrlshiftmap,
  	us_stringmap,
  
- #ifdef DE_KEYBOARD
- 	KBD_DE,		"Germany",
- 	de_keymap,	de_shiftmap,	de_ctrlmap,	de_ctrlshiftmap,
- 	us_stringmap,
- #endif
- 
  #ifdef UK_KEYBOARD
  	KBD_UK,		"United Kingdom",
  	uk_keymap,	uk_shiftmap,	uk_ctrlmap,	uk_ctrlshiftmap,
--- 325,330 ----
***************
*** 421,427 ****
  	us_stringmap,
  #endif
  
! 	0,		"US ASCII",	/* default US_KBD */
! 	us_keymap,	us_shiftmap,	us_ctrlmap,	us_ctrlshiftmap,
! 	us_stringmap,
  };
--- 337,343 ----
  	us_stringmap,
  #endif
  
! 	0,		NULL,
! 	NULL,		NULL,		NULL,		NULL,
! 	NULL,
  };

*** hil.c	Sat Jul 13 08:05:52 1996
--- hil.c.orig	Sat Jul 13 08:44:07 1996
***************
*** 1335,1351 ****
  	if (hilp->hl_kbdlang != KBD_SPECIAL) {
  		struct kbdmap *km;
  
- 		hilp->hl_kbdlang = KBD_DEFAULT; /* default US_KBD */
  		for (km = kbd_map; km->kbd_code; km++)
  			if (km->kbd_code == db) {
  				hilp->hl_kbdlang = db;
! 				break;
  			}
- 		kbd_keymap = km->kbd_keymap;
- 		kbd_shiftmap = km->kbd_shiftmap;
- 		kbd_ctrlmap = km->kbd_ctrlmap;
- 		kbd_ctrlshiftmap = km->kbd_ctrlshiftmap;
- 		kbd_stringmap = km->kbd_stringmap;
  	}
  	splx(s);
  }
--- 1335,1350 ----
  	if (hilp->hl_kbdlang != KBD_SPECIAL) {
  		struct kbdmap *km;
  
  		for (km = kbd_map; km->kbd_code; km++)
  			if (km->kbd_code == db) {
  				hilp->hl_kbdlang = db;
! 				/* XXX */
! 				kbd_keymap = km->kbd_keymap;
! 				kbd_shiftmap = km->kbd_shiftmap;
! 				kbd_ctrlmap = km->kbd_ctrlmap;
! 				kbd_ctrlshiftmap = km->kbd_ctrlshiftmap;
! 				kbd_stringmap = km->kbd_stringmap;
  			}
  	}
  	splx(s);
  }


----- cut here -----

Greetings
	   Hergo
-- 
  Hergo Pape, Magdeburg       -  hergo@wegaop.Boerde.DE