Skip to main content
Home▸ Forums▸ 68kMLA▸ PS2 Keyboard on Mac Plus — #61
Post #61 by bbraun
Source Forum68kMLA
CategoryTroubleshooting
Post DateTue, 8 Oct 2013 - 18:21
Original URLhttps://68kmla.org/bb/threads/ps2-keyboard-on-mac-plus.28252/
Post
Regarding the numeric keypad, don't those keys send two-byte scan codes? That may be what's goofing things up.
Well, sort of. The keypad sends a 0x79 response to the computer's Inquiry command, the computer then sends an Instant command, and then the keypad sends the key event. That's what I'm currently doing. But the physical keypads changed. The original keypad had arrow keys instead of the forward slash and some other keys. Then the Plus keyboard came along, and despite being in one keyboard, it still sent the keypad 0x79 response, and it had the forward slash instead of arrow keys since it had separate arrow keys. But the key codes it is documented to send for those keys are still the arrow key codes. Shift + those keys generate the characters, not the arrow keys.

So, AFAICT without actually having a keypad or a Plus keyboard and going purely from the documentation in IM Volume II and Guide to the Macintosh Family Hardware, the adapter is accurately emulating a separate keypad. I'm really not sure about the Plus keyboard since it was kind of a weird hybrid. I could change the behavior and instead of sending the keypad codes, send the non-keypad variants. forward slash on the keyboard is a different keycode than forward slash on the keypad, and the keyboard one works fine. I'm just not sure if any existing software wants it the way it is now.

But if you did shrink to a 50mm x 50mm board, you could fit the adapter on top of the Discovery board without covering the buttons - double win!
True! The USB board is 60cm x 50cm and has all the same connectors. The 60cm is because the stm32f4's headers are farther apart, and I restricted the "height" of the board to 50cm to be within the 50cm x 100cm limits. Oh, except that one lacks the PS2 connectors, which saves a ton of space.