home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / linux / 23077 < prev    next >
Encoding:
Text File  |  1993-01-07  |  5.4 KB  |  130 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!ghost.dsi.unimi.it!newsserver.di.unipi.it!pimac2.iet.unipi.it!romano
  3. From: romano@pimac2.iet.unipi.it (Romano Giannetti)
  4. Subject: Italian keyboard (and considerations).
  5. Message-ID: <1993Jan7.152213.25738@cli.di.unipi.it>
  6. Sender: netnews@cli.di.unipi.it (USENET News System)
  7. Nntp-Posting-Host: pimac2.iet.unipi.it
  8. Organization: Dipartimento di Informatica, Universita' di Pisa
  9. Date: Thu, 7 Jan 1993 15:22:13 GMT
  10. Lines: 118
  11.  
  12. This is a post "reserved" to Italian linuxers. Following this there is
  13. a simple patch for use italian-layout keyboard with Linux (I have
  14. 0.99pl1, I don't know if tables in keyboard.c has changed in the last
  15. version...). 
  16. To apply this, simply cut the following patch from this posting and
  17. call it 'itkeyb', cd to /usr/src/linux/kernel/chr_drv 
  18. (or wherever you keep your kernel sources) and do a 'patch < itkeyb'.
  19. Then, to use the new keyboard layout, go into /usr/src/linux/Makefile,
  20. comment out the current KEYBOARD and KBDFLAGS definition (near the
  21. top) and add:
  22. KEYBOARD = -DKBD_IT -DKBDFLAGS=0
  23. then rebuild the kernel (make Image, then cat Image > /dev/fd0 and try
  24. booting from the disk... before doing any other dangerous thing:).
  25. You'll have the "strange" key so:
  26.  
  27. alt   -->  @   { [ ] }   `  ~
  28. shift -->  "   / ( ) =   |  (degree symbol)
  29. key  --->  2   7 8 9 0   \  (accented u)
  30.  
  31. and the "quasi-std" bindings of @#[] to the "accented vowel keys" as
  32. well. 
  33. NB I can see the iso-latin1 char only in vi, not in tcsh or bash; I 
  34. think this is due to a compilation option (something like "8 bit clean 
  35. or similar).
  36.  
  37.  
  38. Now, some consideration (MHO).
  39.  
  40. #1. Do you really want the Italian keyboard? I don't. I have made this
  41.    patch for a friend, and I do NOT use it; I am using now an italian
  42.    layout keyboard with US driver, going blindly on "special" key. But
  43.    why the hell the designer of italian keyboards didn't use the "dead
  44.    key" facility to compose accented vowels? They have instead
  45.    substituted them to some "unuseful" key, like '{' and '}' (sigh,
  46.    no, SIGH). And so on... why '(' is on the 9 key and not on the
  47.    8???. Perhaps i began using computers too much years ago and my
  48.    finger go with US layout, but the missing {} in the italian
  49.    keyboard -- or having this with strange shift-alt-ctrl-curse-key --
  50.    is a real bogus... 
  51.    
  52. #2. SUGGESTION: reorganize the keyboard driver in such a way you can
  53.    easily add keyboards layout. I am thinking to an "#include
  54.    KEYBOARD" or similar. Better if it's possible to change the driver
  55.    "on the fly" (It's so difficult? Keyboard tables are of fixed
  56.    lenght... can't you overwrite them runtime?).
  57.  
  58. Now stop chatting and here is the patches. These worked for me, your
  59. keyboard could be different...
  60.  
  61. -------------------------cut here----------------------------------
  62. *** keyboard.c.ori    Wed Jan  6 10:08:51 1993
  63. --- keyboard.c    Wed Jan  6 10:38:33 1993
  64. ***************
  65. *** 356,361 ****
  66. --- 356,409 ----
  67.         0,    0,    0,    0,    0,    0,    0,    0,
  68.         0 };
  69.   
  70. + #elif defined KBD_IT
  71. + static unsigned char key_map[] = {
  72. +       0,   27,  '1',  '2',  '3',  '4',  '5',  '6',
  73. +     '7',  '8',  '9',  '0',  '\'', 236,  127,    9,
  74. +     'q',  'w',  'e',  'r',  't',  'y',  'u',  'i',
  75. +     'o',  'p',  232,  '+',   13,    0,  'a',  's',
  76. +     'd',  'f',  'g',  'h',  'j',  'k',  'l',  242,
  77. +     224, '\\',   0,  249,  'z',  'x',  'c',  'v',
  78. +     'b',  'n',  'm',  ',',  '.',  '-',    0,  '*',
  79. +       0,   32,    0,    0,    0,    0,    0,    0,
  80. +       0,    0,    0,    0,    0,    0,    0,    0,
  81. +       0,    0,  '-',    0,    0,    0,  '+',    0,
  82. +       0,    0,    0,    0,    0,    0,  '<',    0,
  83. +       0,    0,    0,    0,    0,    0,    0,    0,
  84. +       0 };
  85. + static unsigned char shift_map[] = {
  86. +       0,   27,  '!',  '"',  163,  '$',  '%',  '&',
  87. +     '/',  '(',  ')',  '=',  '?',  '^',  127,    9,
  88. +     'Q',  'W',  'E',  'R',  'T',  'Y',  'U',  'I',
  89. +     'O',  'P',  233,  '*',   13,    0,  'A',  'S',
  90. +     'D',  'F',  'G',  'H',  'J',  'K',  'L',  231,
  91. +     176,  '|',  '0',  167,  'Z',  'X',  'C',  'V',
  92. +     'B',  'N',  'M',  ';',  ':',  '_',    0,  '*',
  93. +       0,   32,    0,    0,    0,    0,    0,    0,
  94. +       0,    0,    0,    0,    0,    0,    0,    0,
  95. +       0,    0,  '-',    0,    0,    0,  '+',    0,
  96. +       0,    0,    0,    0,    0,    0,  '>',    0,
  97. +       0,    0,    0,    0,    0,    0,    0,    0,
  98. +       0 };
  99. + static unsigned char alt_map[] = {
  100. +       0,    0,    0,  '@',    0,  '$',    0,    0,
  101. +     '{',   '[',  ']', '}', '\\',    0,    0,    0,
  102. +       0,    0,    0,    0,    0,    0,    0,    0,
  103. +       0,    0,  '[',  ']',   13,    0,    0,    0,
  104. +       0,    0,    0,    0,    0,    0,    0,  '@',
  105. +     '#',  '`',    0,  '~',    0,    0,    0,    0,
  106. +       0,    0,    0,    0,    0,    0,    0,    0,
  107. +       0,    0,    0,    0,    0,    0,    0,    0,
  108. +       0,    0,    0,    0,    0,    0,    0,    0,
  109. +       0,    0,    0,    0,    0,    0,    0,    0,
  110. +       0,    0,    0,    0,    0,    0,  '|',    0,
  111. +       0,    0,    0,    0,    0,    0,    0,    0,
  112. +       0 };
  113.   #elif defined KBD_US
  114.   
  115.   static unsigned char key_map[] = {
  116.  
  117.  
  118. -- 
  119. ***************************************************************************
  120. * Romano Giannetti          * Dip.to di Ingegneria dell'Informazione      *
  121. *                           * Elettronica, Informatica e Telecomunicazioni*
  122. * romano@iet.unipi.it       * via Diotisalvi,2                            *
  123. * giannetti@sssup1.sssup.it * Universita' di Pisa, I-56126 PISA, Italy    *
  124. ***************************************************************************
  125.