Macintosh Portable Keyboard to USB adaptation

Froggy814

Tinkerer
May 6, 2026
202
54
28
Squaw Valley, CA
I could say I wrote this code in a day... But I didn't. I did it in about 4. I made it in 2 attempts. Here is the story:I was waiting to get things for my LCD replacement for the Portable and all of a sudden I was struck by an idea, why not make the keyboard go to USB while you wait? So I did. I took out a sheet of paper that I was working on and drew a rough sketch of the schematic. It all fit together perfectly. Until I could never get the values right. I went with using analogRead, and it never seemed to be good. Until Mr awesome old [probably not] wise guy Techknight says I should use a keyboard matrix! Never had I ever heard of it, so I went in search of a library. And I found a perfect library, the example was exactly what I was looking for. So I installed it with help from Claude and got it working, because it was missing a file and one line of code in it was borked. (everything else was not made by AI) Thankfully I was able to get the matrix down and It now works like a charm! Now to make a case and get it working through ADB and Bluetooth, with it's OG trackball. And incorporate that into the shell as well. What do you think? The one photo with all the resistors is my first attempt. The second attempt doesn't require any resistors at all! Spectacular! (Code and librarys will be uploaded to github shortly)

20261117_173635.jpg
20261118_163740.jpg
20261118_163827.jpg
 

alexanderlewis

New Tinkerer
Nov 18, 2026
5
3
3
Those duplicate entries are worth resolving before adding the numpad: if two labels land on the same row/column, either the table has a transcription error or those keys really share a node. Probing each key in continuity mode and recording its actual row/column pair should also let you fill in the missing spacebar and numpad positions without guessing from the earlier table.
 
  • Love
Reactions: Froggy814

Froggy814

Tinkerer
May 6, 2026
202
54
28
Squaw Valley, CA
I just didn't add the duplicate entries. I was able to get the spacebar and the duplicate entry on the keyboard sorted, but I left out the 4 that were suspect. I didn't state in github (I don't think) that it is for the numpad yet. Because I don't have a numpad, and those are quite hard to come by. So hopefully I can find someone who does. Thank you for the advice! I will double check.
 

Trash80toG4

Active Tinkerer
Apr 1, 2022
1,534
495
83
Bermuda Triangle, NC USA

P1010003.JPG



P1010007.JPG


P1010006.JPG


Looks like I needed two bodge wire setups and so two runs for each due to limited pincount on the HP Bus, didn't remember that part.
 

Froggy814

Tinkerer
May 6, 2026
202
54
28
Squaw Valley, CA
Look's awesome, for mine I just used a couple resistors and analog read. (11 ressitors for the x's and 8 different analog pins to map out the two that were missing.

but look at the x3 value and y2 values and x2 value and y3 values on the numpad there are two duplicates.