bobbimanners / Applecorn

Allows Acorn BBC Microcomputer language ROMs to run on Apple //e enhanced, //c and IIGS.
GNU General Public License v3.0
47 stars 8 forks source link

Support dedicated function keys on extended ADB keyboard #220

Closed bobbimanners closed 1 year ago

bobbimanners commented 1 year ago

Apple IIgs can use an extended keyboard with F-keys. Sure would be nice if they worked :)

ksherlock commented 1 year ago

See figure 2-10 on page 2-43 (Event Manager) of Macintosh Toolbox Essentials for the ADB key codes.

The ADB/keyboard GLU doesn't convert any code above $5c (or thereabouts) to ASCII so it's written as-is to the $c000 keyboard data register. The $c025 keymod register bit 4 (keypad) will be set to differentiate it from a normal keypress. (The keypad bit is also set for keypad characters but those are all < $60)

F1  $7a 'z'
F2  $78 'x'
F3  $63 'c'
F4  $76 'v'
F5  $60 '`'
F6  $61 'a'
F7  $62 'b'
F8  $64 'd'
F9  $65 'e'
F10 $6d 'm'
F11 $67 'g'
F12 $6f 'o'
F13 $69 'i'
F14 $6b 'k'
F15 $71 'q'
bobbimanners commented 1 year ago

Done. Tested working with Wombat + USB keyboard.