Keyboard Scan Codes (JIT)

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
af2412
Space Cadet
Posts: 9
Joined: Wed Nov 26, 2008 1:14 pm
Location: Oregon

Keyboard Scan Codes (JIT)

Post by af2412 »

The first column in the keycodes file is the standard value produced by an XT keyboard (set 1).
See, http://www.win.tue.nl/~aeb/linux/kbd/scancodes-10.html

The second column is the mapped Apple value. A decimal map of the Apple Extended Keyboard scan codes can be found here:
http://www.win.tue.nl/~aeb/linux/kbd/scancodes-10.html

Instead of the E0 two byte value for the extended keyboard, the Basilisk Keycodes file sets forth nineteen values from 156 to 221 (9C - DD).

XT | BII | Apple | (dec) | Char.
e0-1c | 156 | 4C | 76 | KP-Enter
e0-1d | 157 | 3B | 59 | RCtrl
e0-35 | 181 | 4B | 75 | KP-/
e0-38 | 184 | 3A | 58 | RAlt
e0-47 | 199 | 73 | 115 | Home
e0-48 | 200 | 7E | 126 | Up
e0-49 | 201 | 74 | 116 | PgUp
e0-4b | 203 | 7B | 123 | Left
e0-4d | 205 | 7C | 124 | Right
e0-4f | 207 | 77 | 119 | End
e0-50 | 208 | 7D | 125 | Down
e0-51 | 209 | 79 | 121 | PgDn
e0-52 | 210 | 72 | 114 | Insert
e0-53 | 211 | 75 | 117 | Delete

Essentially, the XT value is the reference relationship to the physical key on the keyboard. For example, with the first column value 2 (the 1! key), the value in the second column determines what is recogniozed by the Mac OS, when the key is pressed. Change it from 18 to 1, and the system recognizes an "s" instead of a "1."

Unfortunately in my setup with an original Apple Extended Keyboard, the JIT version does not recognize the extended values listed above. Very few applications recognize the NumLock key, and then permit use of the navigation keys with their default value. Both the Ctl and Alt keys cannot be remapped. Changing prefs "keyboardtype" from 5 to 2 is also ineffective (2=Apple ADB Extended, which I use with a USB adapter).

Am I wrong? Has anybody made this work properly?
Post Reply