From: Julio Sanchez (jjsf@gmv.es)
Date: 04/28/93


From: jjsf@gmv.es (Julio Sanchez)
Subject: NEW: Keyboard definition for Spanish
Date: Wed, 28 Apr 1993 14:00:40 GMT

Enclosed is a patch to keyboard.c in the kernel that implements two different
definitions for the Spanish keyboard. You can make use of them by applying
the patch to /usr/src/linux/kernel/chr_drv/keyboard.c and adding the
following two lines to the list of keyboards in /usr/src/linux/Makefile:

# KEYBOARD = -DKBD_ES -DKBDFLAGS=0
# KEYBOARD = -DKBD_ES_LATIN1 -DKBDFLAGS=0x97
  
You can then select any of these two definitions when you make a new
kernel. I am not sure why some languages define two keyboards. I did
the same and found that KBD_ES is simpler to use if you just write
in English or write programs and you don't mind the limitations. On
the other hand, KBD_ES_LATIN1 is a close simulation of the definition
in MS-DOS, but common keys in UNIX are not readily available. The
Spanish keyboard just does not have a key labeled ~, so I resorted to
define RIGHT-ALT plus the key that has the Spanish inverted ? and !
as ~. I would appreciate any better suggestion. MS-DOS cannot generate
directly that character. That explains the unusual KBDFLAGS used by
KBD_ES_LATIN1. This patch was produced two months ago and has been
circulated to selected people.

I have also produced a patch to fixkbd.c (getting quickly obsolete),
a keyboard definition for intl_con (dead keys didn't work properly)
and an Xmodmap definition (that is being posted to comp.windows.x.i386unix).

I had planned to do something similar for national (that is being now
distributed in SLS), but did not have time. I am leaving for two weeks,
if anyone is interested in any of the above, please contact me before
Friday, or wait till I come back.

All the best,

Julio

========================== Cut here ==============================
*** keyboard.c.orig Fri Feb 26 19:19:19 1993
--- keyboard.c Fri Feb 26 22:20:44 1993
***************
*** 1047,1052 ****
--- 1047,1148 ----
          0, 0, 0, 0, 0, 0, '\\', 0,
          0, 0, 0, 0, 0, 0, 0, 0,
          0 };
+
+ #elif defined KBD_ES
+
+ static unsigned char key_map[] = {
+ 0, 27, '1', '2', '3', '4', '5', '6',
+ '7', '8', '9', '0', '\'', 0, 127, 9,
+ 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i',
+ 'o', 'p', '`', '+', 13, 0, 'a', 's',
+ 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0,
+ '\'', '`', 0, 0, 'z', 'x', 'c', 'v',
+ 'b', 'n', 'm', ',', '.', '-', 0, '*',
+ 0, 32, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, '-', 0, 0, 0, '+', 0,
+ 0, 0, 0, 0, 0, 0, '<', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0 };
+
+ static unsigned char shift_map[] = {
+ 0, 27, '!', '"', '#', '$', '%', '&',
+ '/', '(', ')', '=', '?', 0, 127, 9,
+ 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I',
+ 'O', 'P', '^', '*', 13, 0, 'A', 'S',
+ 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0,
+ 0, '~', 0, 0, 'Z', 'X', 'C', 'V',
+ 'B', 'N', 'M', ';', ':', '_', 0, '*',
+ 0, 32, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, '-', 0, 0, 0, '+', 0,
+ 0, 0, 0, 0, 0, 0, '>', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0 };
+
+ static unsigned char alt_map[] = {
+ 0, 0, '|', '@', '#', '$', 0, 0,
+ '{', '[', ']', '}', '\\', '~', 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, '[', ']', 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ '{', '\\', 0, '}', 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, '~', 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, '|', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0 };
+
+ #elif defined KBD_ES_LATIN1
+
+ static unsigned char key_map[] = {
+ 0, 27, '1', '2', '3', '4', '5', '6',
+ '7', '8', '9', '0', '\'', 161, 127, 9,
+ 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i',
+ 'o', 'p', '`', '+', 13, 0, 'a', 's',
+ 'd', 'f', 'g', 'h', 'j', 'k', 'l', 241,
+ 180, 186, 0, 231, 'z', 'x', 'c', 'v',
+ 'b', 'n', 'm', ',', '.', '-', 0, '*',
+ 0, 32, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, '-', 0, 0, 0, '+', 0,
+ 0, 0, 0, 0, 0, 0, '<', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0 };
+
+ static unsigned char shift_map[] = {
+ 0, 27, '!', '"', 183, '$', '%', '&',
+ '/', '(', ')', '=', '?', 191, 127, 9,
+ 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I',
+ 'O', 'P', '^', '*', 13, 0, 'A', 'S',
+ 'D', 'F', 'G', 'H', 'J', 'K', 'L', 209,
+ 168, 170, 0, 199, 'Z', 'X', 'C', 'V',
+ 'B', 'N', 'M', ';', ':', '_', 0, '*',
+ 0, 32, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, '-', 0, 0, 0, '+', 0,
+ 0, 0, 0, 0, 0, 0, '>', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0 };
+
+ static unsigned char alt_map[] = {
+ 0, 0, '|', '@', '#', '$', 0, 172,
+ '{', '[', ']', '}', '\\', '~', 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, '[', ']', 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ '{', '\\', 0, '}', 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, '~', 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, '|', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0 };
+
+
  #else
  #error "KBD-type not defined"
  #endif
============================ Cut here ===============================