Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!ut-emx!nather From: nather@ut-emx.UUCP (Ed Nather) Newsgroups: comp.sys.ibm.pc Subject: Toshiba T1200 laptop keyboard atrocity Keywords: frustration incompatibility idiocy Message-ID: <10240@ut-emx.UUCP> Date: 6 Feb 89 17:04:56 GMT Organization: The University of Texas at Austin, Austin, Texas Lines: 47 The Toshiba T1200HB laptop is a light-weight (11 lbs) PC clone with a supertwist backlighted LCD screen, 1 Meg memory, 720K minifloppy drive, and 20 Mb hard disk, based on an 80C86 running at 9.54 MHz. It's a small, fast machine that is very nice to use ($2250 discounted) but it has a bomb built into the keyboard system it took me two days to unravel. On "normal" PC clones the keyboard sends individual scan codes to the processor which are interpreted by the BIOS. Each key sends one (and ONLY one) unique code, with the high bit set to 0 when the key is depressed, and set to 1 when it is released. The keyboard repeats the on-going code if it is held down. All keys are independent of each other, and all do the same thing: 1 code, plus repeats, off-going marked as "negative". So for something like the left keyboard shift key, code (+)42 indicates it has been depresses, further (+)42 codes indicate it's been held down, and a -42 code indicates it's been released. I wrote a real-time data acquisition program that has run unchanged on a real IBM PC, a Standard brand clone, a Blue Chip clone, a JDR clone, and a Toshiba T3100. I was startled when it failed to run properly on a Toshiba 1200. Here's why it failed: The keys Home, PgUp, PgDn, End, Ins, Del and the 4 arrow keys send multiple codes when they are actuated. Each code is preceded by a code 224 (-96). My program ignores unrecognized codes so it didn't barf on this. But that's not all, fffolks! IF the left-hand shift key is down when you press, say, the right arrow key, the keyboard send the code sequence -96 -42, thus indicating to the program that the user has undepressed the shift key! When the right arrow key is released, it sends -96 (+)42, indicating the left-hand shift key has been pressed again! This also happens with the right-hand shift key (54) -- any of the above named keys does the same dastardly thing. In addition to totally violating the basic design criteria of the scan-coded keyboard, this heinous deed is compounded by a total silence in the normal documentation that comes with the machine. The keyboard lies to the program, and the documentation stone-walls for it. Watergate had nothing on this. I have written extra code that traps the code -96 precursor, and that throws away the bogus -42 and -54 codes generated by the keyboard, and the program now works as it should. Bah. Arrrrrrrrrrrrrrgh. Fooey. If it weren't otherwise such a nice machine I'd have crushed it under a truck wheel. -- Ed Nather Astronomy Dept, U of Texas @ Austin