From: Enrico.Scotoni@gccs.fido.imp.com (Enrico Scotoni)
Newsgroups: comp.os.linux.announce
Subject: Dec Lk450 Keyboard Patches
Date: 22 Jul 1993 20:56:41 -0400
Approved: linux-announce@tc.cornell.edu (Matt Welsh)
Message-ID: <22nd09$l4a@theory.TC.Cornell.EDU>

High all,

in case there are other poor people, who have to work with a DEC pc and a
LK450 keyboard attached, I post this message. The LK450 keyboard has 6
additional keys:

key     scancode
================

f13     e0 3d
f14     e0 3e
help    e0 3f
do      e0 40
f17     e0 41
kp_add  e0 4e (an additional one just above the normal one)

I've patched keyboard.h and keyboard.c to support these keys (I was annoyed
getting "unknown scancode", when hitting one of these keys by mistake). As
my keyboard is the swiss-german version (guess in what country I am sitting)
I also changed the sg-latin1.map to be correct for this keyboard. I've
uploaded a file kbdlk450.tgz to:

The Purple Tentacle:    +44 734 590 990 (2:252/305)
The Baboon's Kid:       +41 62 51 3401  (2:301/581)

It contains the following:

keyboard.lk450.c        (the changed version of keyboard.c)
keyboard.c.diff         (context diff of the above to the normal keyboard.c)
keyboard.lk450.h        (the changed version of keyboard.h)
keyboard.h.diff         (context diff of the above to the normal keyboard.h)
sg-latin1-lk450.map     (swiss-german key-map for lk450)

Sorry I have no Internet access, so I just was able to upload to the above
two BBS's. I post the two context diffs also here (they are short):

======================= cut ====================

*** keyboard.h  Wed Jul 21 09:51:03 1993
***************
*** 132,138 ****
        kbd->flags ^= 1 << flag;
  }

+ #ifndef LK450
  #define NR_KEYS 112
+ #else
+ #define NR_KEYS 118
+ #endif
  #define NR_KEYMAPS 3
  extern const int NR_TYPES;
  extern const unsigned char max_vals[];

*** keyboard.c  Wed Jul 21 09:51:28 1993
***************
*** 183,189 ****
                        0x50,   /* editpad dn */
                        0x51,   /* editpad pgdn */
                        0x52,   /* editpad ins */
+ #ifndef LK450
                        0x53    /* editpad del */
+ #else
+                       0x53,   /* editpad del */
+                       0x3d,   /* f13 */
+                       0x3e,   /* f14 */
+                       0x3f,   /* help */
+                       0x40,   /* do */
+                       0x41,   /* f17 */
+                       0x4e    /* keypad minus/plus */
+ #endif
                };
                u_word key_code;
                char break_flag = scancode > 0x7f;
***************
*** 607,613 ****
        K_F12,   K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,
        /* unshifted e0 keys */
        K_PENTER, K_RCTRL, K_PSLASH,    28, K_ALTGR, K_BREAK,  K_FIND,    K_UP,
+ #ifndef LK450
        K_PGUP,   K_LEFT, K_RIGHT, K_SELECT, K_DOWN,  K_PGDN, K_INSERT, K_REMOV
+ #else
+       K_PGUP,   K_LEFT, K_RIGHT, K_SELECT, K_DOWN,  K_PGDN, K_INSERT, K_REMOV
+       K_F13,    K_F14,  K_F15,   K_F16,    K_F17,   K_PPLUS },
+ #endif
        { /* shifted keys */
         K_HOLE,      27,     '!',     '@',     '#',     '$',     '%',     '^',
            '&',     '*',     '(',     ')',     '_',     '+',     127,       9,
***************
*** 623,629 ****
          K_F12,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,
        /* shifted e0 keys */
        K_PENTER, K_RCTRL, K_PSLASH, K_HOLE, K_ALTGR, K_BREAK, K_FIND,  K_UP,
+ #ifndef LK450
        K_PGUP,   K_LEFT, K_RIGHT, K_SELECT, K_DOWN, K_PGDN, K_INSERT, K_REMOVE
+ #else
+       K_PGUP,   K_LEFT, K_RIGHT, K_SELECT, K_DOWN,  K_PGDN, K_INSERT, K_REMOV
+       K_F13,    K_F14,  K_F15,   K_F16,    K_F17,   K_PPLUS },
+ #endif
        { /* alted keys */
         K_HOLE,  K_HOLE,  K_HOLE,     '@',  K_HOLE,     '$',  K_HOLE,  K_HOLE,
            '{',     '[',     ']',     '}',    '\\',  K_HOLE,  K_HOLE,  K_HOLE,
***************
*** 639,645 ****
          C(23),  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,  K_HOLE,
        /* alted e0 keys */
        K_PENTER, K_RCTRL, K_PSLASH, K_HOLE, K_ALTGR, K_BREAK, K_FIND,    K_UP,
+ #ifndef LK450
        K_PGUP,   K_LEFT, K_RIGHT, K_SELECT, K_DOWN, K_PGDN, K_INSERT, K_REMOVE
+ #else
+       K_PGUP,   K_LEFT, K_RIGHT, K_SELECT, K_DOWN,  K_PGDN, K_INSERT, K_REMOV
+       K_F13,    K_F14,  K_F15,   K_F16,    K_F17,   K_PPLUS }};
+ #endif

  /*
   * send_data sends a character to the keyboard and waits

=================== cut ==============

I hope this helps somebody. Oh I forgot to mention: I am talking about
kernel 0.99pl10 and you have to "#define LK450" or "-DLK450" in order to
activate the LK450 keyboard.

Regards

Enrico Scotoni
 o QMPro 1.50 41-2683 o Dogs come when you call. Cats have answering machines.
-- -------------------------------------------------------------------- --
-- Baboon Bbs Internet GateWay Switzerland   fidonet 2:301/580 REC 30   --
-- -------------------------------------------------------------------- --

-- 
Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu
