Smart IBM PC/AT keyboard

AndyJ

19 Jun 2023, 19:46

So... the Voices in my head wouldn't shut up, and I have one of my AT keyboards apart.

I always found the giant "cranium" above the number row to be ugly and irritating. It's about half full of circuit boards with old-school discrete components; one for the keyboar controller, one for the 'lock' lights. That means it's about half empty, even without doing a modern controller and QMK conversion. Which is on the to-do list; I'd like to be able to plug it into the USB port on a modern computer without needing a hardware adapter and a bunch of fiddly xmodmap scripting.

Even with the original IBM controller, there's room for a Raspberry Pi Zero, an NVMe drive and USB adapter, a small USB hub, and room to route USB cables among them. I just laid the parts out to make sure. If I mount the Zero and the drive over the original circuit board, there's a ton of room for the hub and the wiring.

So: USB mod with piggybacked single-board computer, plugged into a powered hub. I think there's a "high power" USB port on the desktop for charging phones and stuff; that'd probably work without needing a powered hub.

There'd be one USB cable coming out of the keyboard, and no indication whatsoever that there was a computer inside.

The trick is that the Zero has a USB "OTG" port, which is bidirectional. With the current Raspberry Pi OS and a modern Linux distribution, the Pi is supposed to show up as a virtual network device, and you can connect to it with ssh.

So far I haven't managed to get that to work. I ordered another OTG cable in case the first one was bad, and I thought I had a couple more Zeros around, though they're hiding at the moment. I'm puttering with that as time permits. The OTG is the magic bit that makes it all practical, assuming I ever get it to work.

What would I do with a hidden computer? Other than the incredible coolness, it would be a reasonably safe place for my password manager host, automatic backups of important files, etc. Nobody is going to steal an antique keyboard that's larger and heavier than a modern laptop computer.

I'm conflicted about adding an external USB port on the side; it would be very handy though.

The Pi runs a variant of Debian Linux. It's slow, but a lot faster when you don't need to load the X Window System. Its USB bits port only run at 2.0 speed.

I'll update this as things happen, but it's pretty far down on the round tuit totem pole, so it's not going to happen very fast.

User avatar
fohat
Elder Messenger

19 Jun 2023, 21:40

While you are in there, if you have mid-level Dremel skills, an ANSI mod and adding Alt keys is very worthwhile.

AndyJ

19 Jun 2023, 22:19

I've gone beyond that; I'm using a 1.25u Enter key, which let me recover two useable key barrels. And I split both Shift keys and the Insert key, too. I don't have any flippers for them in my daily-driver keyboard yet, though.

The left "M alt" key will be an extra Backspace, Colemak-style. The right will be Alt-Gr. I already have the keycaps for that, and an M spacebar, and now that the spare keyboard is apart, that should happen Real Soon Now.

Except for the M alt keys, it looks pretty much like the picture below.
Attachments
PC-AT with split Enter and split shifts.jpg
PC-AT with split Enter and split shifts.jpg (61.36 KiB) Viewed 11948 times

User avatar
LambdaCore

21 Jun 2023, 08:24

That's quite an interesting layout, I actually wonder how having an extra backspace where Alt would traditionally go on a modern Keyboard would feel. As for the nav layer on your numpad, I couldn't recommend enough mimicking the traditional nav cluster over the layer.

User avatar
Muirium
µ

21 Jun 2023, 12:17

Indeed. The inverted T of arrow keys at least:

Image

My AT’s a compromise between that T and maintaining a numpad; which I toggle between numeric and mouse keys, by hitting our good friend Vladimir Ilyich!

Another, probably more sensible way to do it is a T topped by a full-on navigation six-pack right above it. You’d have a 1u rim to the top and right left over, though. My own solution to the problem spared all that, as I care a touch too much about the looks.

AndyJ

21 Jun 2023, 18:55

It's hard for me to express how much I hate the inverted-T thing. Going back to a proper cursor pad was the main reason I finally went back to the AT keyboard. The F107 has the arrow keys laid out properly, but exiles the Home, End, and Pg?? keys off into Siberia. I do a *lot* of text editing, and I make extensive use of the AT cursor pad layout. Everything is right there; no need to reach for another block of keys all the time.

The other problem with the inverted-T is the "cramp factor." It's painful to use. It took me a long time to realize that's because keyboards in general were designed when any kind of keyboarding was "women's work", and therefore they were designed for 75th-percentile *female* hands. I have about 90th-percentile male hands; all standard keyboards are already a size too small to be optimal.

I'm not entirely sure about the PC/AT, but the PC and PC/XT defaulted to cursor pad; you had to hit the shift or numlock key to make it a number pad. I never had any use for the number pad; I'm left-handed, and it's faster to use the top row than to peck at the shifted cursor pad with my right hand.

Over the last half year I've been paying attention to how I use the keyboard. One of the Colemak variants has the top row default to the symbol keys, and numbers are shifted. That would actually be a more practical layout; I use #, $, %, @, and & a whole lot more than numbers. I haven't decided if I want to go in that direction, though.

The Colemak guys have motion-study data on the bottom-row backspace. Of course, they're assuming it's the only backspace. Maybe I'll like it, maybe I won't. I'll find out.

User avatar
Muirium
µ

21 Jun 2023, 22:50

Personally, I’ve got bigger hands than most, and I use 60% keyboards so HHKB diamond navigation keys most of the time. I prefer them. But I much prefer an inverse T arrow cluster to the arrows-in-a-numpad that IBM inflicted on the world with the XT and AT. What point is there in the key in the middle? The (male dominated home PC) world embraced inverted T with the Model M and never looked back.

If you prefer the PG PC way of doing it, no problemo: there it is just as you like it, in this case. Separating Page Up and… just a sec… Page Down etc. as well as Left and… be right back… Right arrows seems eccentric to say the least but 1981 IBM did it (before they fixed it) so it must be right. :P

Findecanor

21 Jun 2023, 23:29

AndyJ wrote:
21 Jun 2023, 18:55
The other problem with the inverted-T is the "cramp factor." It's painful to use.
If I understand you correctly, you are complaining that it is on the bottom row.

That's not the fault of the inverse-T itself but of where IBM had relocated it. The original inverse-T on the DEC LK201 had the cluster one row up — where I think it belongs.

Then, it works better. If the right hand does not have its fingers curled then the middle finger lands in-between the Up and Down keys. I think many typists for IBM Model-M/Enhanced layout keyboards have a habit of moving their right hand not just to the right for using the keys but also down, so as to make this more natural, but they shouldn't have to .

AndyJ

22 Jun 2023, 17:54

On the PC/AT cursor pad, my ring finger does Home-Up-PgUp-Left and my little finger does Right, PgDn, End, and Del, as well as "-" and "+".

After remapping the cursor pad, the little finger also does Enter and "*".

I swapped all the keycaps with Model M ones, including Enter. I had Unicomp make me a 1u "+". Now my cursor pad is number-free.

AndyJ

25 Jun 2023, 19:32

xhwatsit controller, barrels, flippers, springs, and a short space bar coming from modelfkeyboards.com.

Two MX-to-IBM-keycap adapters coming from Shapeways. I took the default material and surface finish (white ABS, no post-processing), which came to $8 for two pieces, for a total of $22.41 after various surcharges, tax, and shipping. Urk.

I have a piece of closed-cell foam the right size and thickness to make an AT foam piece out of. I have a set of hole punches, but they're externally tapered. I need to make an internal-tapered punch that matches the holes in the top plate; then I can just use the top plate as a guide for making the holes.

Some more OTG adapters and cables came in yesterday, prompting the orders for more parts. I'm still going to try to cram loose cables in since my soldering skills are rudimentary, but it's kind of a connector disaster; USB-C on the xwhatsit, Micro USB OTG on the Zero, and USB-A on the M.2 adapter. Once I get the xwhatsit controller in I'll see what I need as far as the USB hub and angle adaptors or cables.

Wickedpedia says "All USB-C cables must be able to carry a minimum of 3 A current (at 20 V, 60 W) but some can also carry high-power 5 A current (at 20 V, 100 W).[11] USB-C to USB-C cables supporting 5 A current must contain e-marker chips (also marketed as E-Mark chips) programmed to identify the cable and its current capabilities. USB Charging ports should also be clearly marked with capable power wattage.[12]"

Jeff Geerling tested the power draw of a Pi Zero: Idle, HDMI disabled, LED disabled 80 mA (0.4W)

I won't be using HDMI, and the board should be largely idle, though consumption will go up as it is tasked with doing stuff.

AnandTech rested the Samsung M.2 drive as 222mW.

I don't know what the xwhatsit, the USB hub, and the M.2 adapter will pull, but a standard USB-C cable and port ought to have plenty of cowbell for the job.

User avatar
Muirium
µ

25 Jun 2023, 22:17

Xwhatsit controllers are quite power efficient. Here’s what I wrote when I installed one in my AT in 2019:
Muirium wrote:
27 Sep 2019, 00:44
An extra bonus is I can use this [AT] with the iPad now it's lost its power draining IBM controller. Nice to have the AT up at Kishsaver level functionality after all these years!
Previously, I had Soarer on a Teensy in there, converting from the OG IBM controller. Not only was this too power hungry for the famously mean iPad USB adapter but the IBM controller was too much even for a pro micro! I never did use another pro micro after having to tear it out once it was clear it wouldn’t stay up reliably! Grr.

AndyJ

27 Jun 2023, 02:50

The top plate had the usual white measles. Definitely corrosion of some sort... but it's a steel plate, and steel corrosion is red, not white. There was corrosion on both sides of the plate.

The black paint practically fell off when I hit it with sandpaper. I wonder if it was something in the paint that was the problem? The bottom plate is plated with cadmium or some similar metal; it doesn't have any corrosion at all.

jak123

27 Jun 2023, 19:03

This is a really interesting idea (even more so now that Pi availability is starting to stabilize). It reminds me a bit of the Pi400, but I realize that's not the goal.

The PiKVM project has good tutorials on how to setup the USB-to-go port on a Pi. They're typically using a Pi4, but I'm pretty sure the OS configs are similar for a Zero. In the case of the PiKVM project, they're setting up the Pi to look like a keyboard and mouse HID device(s), and optionally configured to look like a serial port device, which can be used as a console terminal to access the Pi from the server (which is super useful if you need to put the PiKVM on an unfamiliar wireless network or something like that). They also have good information on how to build a Y cable that allows power into the Pi, but isolates the USB data lines.

AndyJ

27 Jun 2023, 20:47

Yeah, it's apparently easy with the Pi 4. I have to make another attempt with the Zero; sometimes the desktop will see something there, but it can't talk to it. I'm hoping it's a cable problem; I just got another OTG cable to try.

There are other micro-micro-computers out there, including some with more cowbell than the Zero as well as USB OTG, but OS support is usually some kind of patched ARMbian. I'm not a Pi cultist, but they have 90% of the market and development efforts, and I've been burned by Pi-alikes before. Most of them are limited to a patch set on ARMbian, and can take a lot of work to get running.

Though if the freakin' Zero won't cooperate, I might have to go that route. There's not room for a Pi 4 in the AT case.

AndyJ

30 Jun 2023, 03:54

I ordered a precut foam panel from a vendor on eBay. Since I have three keyboards to do, I'll try DIY'ing the foam on the other two. Finding round tuits to make a new foam panel wouldn't help get this one done.

The original foam looked okay when I took the keyboard apart, but it didn't survive disassembly. I got about half of it unstuck from the plate, and after that it was just crumblies.

AndyJ

07 Jul 2023, 18:23

The MX-to-IBM keycap adapters showed up from Shapeways. They're marginally satisfactory.

I took the default material and surface finish. They have "3d print" lines, but they're no problem.

The Model M keycaps fit, but loosely. I'm guessing they need to be .005" or so larger each way for the caps to fit snugly. If the caps wouldn't stay in place in service, a dab of Blue-Tack or something would probably work fine to hold them in place.

The main problem is that the post inside the adapter is sharply angled so the top of the cap is parallel to the switch body. Which is correct if you're adding an MX switch to an IBM buckling-spring keyboard. The top of the post is a fixed location; if you shift it up or down, it will move the whole keycap up or down, so the keys wouldn't like up with the others. The adapters were probably designed for standard MX switches; I am using low-profile "laptop" switches. The inside of the adapter binds on the front edge of the switch at the bottom of the stroke; about half the some, it won't return to the default position. I should be able to reach in there with a burr and make some clearance. Not a big deal. The geometry of this stuff is more complicated than I expected.

On the good side, it looks like the height will work out okay. It looks like I'll need a thin spacer for the laptop switches to sit at the proper height. If I'm lucky I'll be able to use one of those tiny MX PC boards. I anticipated having to cut a couple of square holes in the top plate if necessary to get everything to line up.

User avatar
Muirium
µ

07 Jul 2023, 22:42

AndyJ wrote:
07 Jul 2023, 18:23
They're marginally satisfactory.
You’re very generous!

I’d also watch out for the material crumbling when caps are inserted and removed, and indeed in any attempts you make at modding them. I’ve found the stuff to be downright demonic! It loves to embed itself deep inside keycaps, right in the way authentic stems need to go, and be a total m*****fucker to remove.

AndyJ

08 Jul 2023, 01:07

I'm not really complaining; I lowballed the printing on purpose, because I suspected they'd need some tweaking.

I might have to fiddle with the post dimensions a bit, too. I don't have any MX keycaps to compare them to. Maybe they're supposed to just pull off. I'm used to IBM keys, which snap into place.

AndyJ

08 Jul 2023, 01:16

After writing that I remembered I had one of those 9-switch "switch testers" with different colors of Cherry switches. They're standard desktop switches, and the adapters fit perfectly. They're actually noticeably tigher than the original caps.

The tester got relegated to the junk box shortly after I got it. Either they're all the same switch with different colors, or I've been ruined by decades of Model F usage - I can't tell one switch from another.

If the two Cherry switches work out okay with the Model F, I might take one of the Model Ms out of the pile and see about correcting the horrible inverted-T cursor key disaster.

AndyJ

12 Jul 2023, 03:31

The precut foam from the kbdzero on eBay showed up. It's more like very soft rubber than foam. It looks very nice.

Still waiting on the xwhatsit, extra barrels, flippers, and other bits from modelfkeyboards.com. It has only been a little over two weeks, but I want my instant gratification RIGHT NOW!

Now I'm feeling the urge to dig that old IBM PC/AT case out and do the mods to put an ATX motherboard in. I should probably wait until fall when it's not so hot out in the shop, though.

AndyJ

15 Jul 2023, 17:35

I have one keyboard I remapped with xmodmap, using with a simple USB adapter. I have a second board I took apart and cleaned; I'm still waiting for the barrels and flippers. Last night I took the third (and last) keyboard apart.

The foam was completely disintegrated, and the remains were solidly stuck to the barrels and plate. The barrels were stuck so much I had to use a small hammer to tap them out. There were bits of foam down on the circuit board and around the flippers; the board probably wouldn't have worked. Amazingly, other than a few pieces of fluff around the barrels, it was very clean otherwise.

I dumped all the barrels and clippers into my ultrasonic cleaner. It gets hot, but apparently the ultrasonic part has gone 404. I found some comments on the web saying the transducer is glued to the bottom of the tank and sometimes falls off; I'm going to open it up and check. Meanwhile, sitting overnight in hot soapy water didn't affect the foam gunk stuck to the barrels at all.

I need to steal five flippers from #3 to put #2 back together. #3 will get the M spacebar mod later, when the replacement barrels come in.

Meanwhile, before I separated the plates, I checked the fit of the MX laptop switches. They're about 1.5mm high, with the switches sitting on the top plate. But there's about a 2mm round post on the bottom of the switch; I think a simple round hole will take care of both adjusting the height and locating the switches. I'll have to drill some more holes to pass the wires through; it shouldn't be a big deal.

Compared to AT buckling spring switches, the red MX clone switches feel like poking a puppy in the eye.

AndyJ

19 Jul 2023, 03:35

So, board #3 is ready to go back together. Just a cleanup, new foam, and extra flippers for the various split keys.

The disintegrated foam made it easy to simply slide the plates apart. Fresh foam makes it difficult to put them back together. I managed to squeeze the plates enough to engage the tabs, but even tapping with a hammer wouldn't slide them into complete engagement. I bought a framing clamp earlier today and will try again.

The spacebar has to be on before assembly, as there is no way to engage the wire hooks otherwise. That means the flipper wants to stand up proud of the barrel, and you have to be very careful ou don't get the flipper caught between the barrel and the circuit board.

I'm tempted to haul the bottom plate out to the workshop and mill some windows into it so I dink with the wire after the halves are together.

AndyJ

03 Feb 2024, 20:36

The internal Pi idea stalled after my complete failure to get the host system to access the Pi Zero over USB. I bought another OTG cable, just in case the first one was fake or bad, and then a third, just to make sure. The host system can (usually!) tell there's a device plugged into the cable, but it can't talk to it. I don't know where the problem is; the particular Pi Zero I have, three bad cables, something about Ubuntu on the host, or some fault in the different tutorials I've been using.

Yesterday I realized that since I primarily need character-mode access to the Pi, I might be able to use a USB C-to-serial adapter to connect. I don't know if it's possible to mount a serial device as a remote filesystem, but if not, I can bodge up some scripts to fake it.

User avatar
Muirium
µ

03 Feb 2024, 22:47

Beware USB C. It needs a pull-up resistor to fall back to USB as we know it, in case that’s the issue blocking you:

viewtopic.php?p=514949#p514949

The inability to use a straight USB C cable to hook up my USB C ported AT to my USB C computer has annoyed me enough I’m considering putting a coiled IBM cable back instead of that damn socket. The USB consortium really screwed the pooch this time. USB in name only. :roll:

AndyJ

04 Feb 2024, 21:42

I have hated USB in all its forms since its introduction. It's an excellent example of "standards are wonderful, there are so many to choose from!"

Right after I posted about the serial adapter I found a link to a "Linux USB key fob" called a PocketBeagle, which supports USB OTG and is supposed to be mountable as a filesystem as well as networked. The board and the recommended OTG cable run about $30 plus shipping. It's smaller than the Pi Zero and has more horsepower, but their web site hasn't had any updates in two years. Everything goes out of support eventually, so it's not necessarily a deal-breaker, but it does mean if I try one and it doesn't work first try, it's probably not worth putting any further effort into a dead product.

AndyJ

05 Feb 2024, 07:59

Okay, I tried to buy a PocketBeagle. BeagleBoard doesn't sell them on its web site. Going price on eBay and Amazon was $65 and $59. I found them at Mouser Electronics for $35.63 plus $8 shipping. With tax, that's close to fifty bucks. I'll have to think about that for a while.

I *could* just run an Ethernet cable to the Pi Zero alongside USB and power cables, inside one of those woven cable sleeves, but the fan of connectors at the far end wouldn't be very stealthy. [sigh]

AndyJ

07 Feb 2024, 23:32

I found out that a full-size Raspberry Pi board will *just barely* fit. The Ethernet port is blocked by one of posts that holds the LED board. I did some trial fitting with a 3B+. The Pi 4 has USB OTG and the same port layout, but that's $55+shipping, and way more horsepower than I need. [twiddling thumbs]

I think I'm just going to do a hydra cable for the Pi Zero. I ordered a USB-to-Ethernet adapter for it. USB-C to USB-A for the XWhatsit, Micro USB to USB-A to power the Zero, and I'll run an Ethernet cable for communication. I can drop the end of the cable behind the desk where it's not obvious. Not full stealth like what I wanted, but good enough while I wait for some better solution to come along.

If things work out I might buy a Pi 4 or 5 and see if I can get everything to run off a single USB-C cable. This whole thing might be one of those Grand Ideas that looks really good until it gets implemented, and then I wonder why I started.

AndyJ

15 Feb 2024, 17:10

I ordered an Orange Pi Zero 3. It cost $28. Unlike the Orange Pi One I played with a couple of years ago, it doesn't run ARMbian; it has tweaked versions of Ubuntu, Debian, Arch, or Android.

The board is about 2/3 the size of a Raspberry Pi, and all of the ports are on the same edge, which can be turned to face the center where the keyboard cable comes out. It has one full-size USB-2 port I can plug the M.2 adapter into (with a short cable; it will get tucked in by the keyboard controller), a USB-C port for power and USB OTG, an Ethernet port, micro-HDMI, and a pin header supporting two more USB-2 ports and a serial port.

1.5GHz quad-core 64-bit ARM processor, 2 Gb RAM, gigabit Ethernet, wifi, Bluetooth, i2C, and a bunch of other stuff that I would happily trade for at least one USB-3 port, but so far I haven't found any really small single-board computers with USB-3. They all use "SOCs" (System on a Chip) designed for cellular phones, which generally don't support USB-3, for some reason.

I wrote the Debian image to a new 32Gb SDcard, found USB power adapter with enough power output to meet the board's requirements, went to look for a cable to plug in... and I know I had three or four USB-C cables a couple of years ago, when I fumble-fingered an order for some Micro-USB cables. It wasn't worth the hassle of going to the post office to send them back. Alas, the Cable Fairies seem to have made off with the entire lot. I ordered a new one yesterday, that's also supposed to support USB OTG.

I'm not having much faith that the OPi's OTG is going to work any better than the RPi's OTG, so I expect I'll use Ethernet and a Y-cable to talk to the OPi.

If I mount the OPi to the top part of the keyboard, I'll either have to notch the towers that hold the LED board, or just remove one entirely and make a support to keep it from flopping around on a single screw. No big deal. If I mount the OPi to the bottom half of the keyboard, it *might* clear the towers. I'll use a sandwich bag and some pieces of modeling clay to see what kind of clearance I have, if any. I'm a bit leery of disassembling the keyboard halves any more than I have to; the plastic is four decades old and I'm afraid of breaking something. Still, it would be nice not to have to make a permanent modification to the keyboard, even if it's invisible from the outside.

I have a Raspberry Pi 3B+ that's running a Pi Hole, a small web site, hosts some files I might need from elsewhere (not 'cloud', just rsync), and a small PostgreSQL server for playing with some database stuff. I've been thinking about running a password server, but I'm a security troglodyte who still has his passwords written down in a vest-pocket notebook. Hey, nobody has hacked that yet...

AndyJ

21 Feb 2024, 14:38

The Orange Pi Zero 3 has one USB port. It sees the keyboard, mouse, and M.2 adapter just fine. However, when plugged in to the hub, it only sees the M.2 adapter.

I ran into this before, with the Orange Pi One, until I found a USB hub that it liked. Ironically, the same brand as the one I'm using now. Though the guts might be entirely different, of course.

I've *always* had problems with USB stuff, even in Windows. Particularly back in the day when you had to load the driver for the USB device from a floppy disk or CD, because almost none of them were compatible enough to the USB 1.0 specification to actually work without needing proprietary drivers... Linux support was iffy for a very long time. [sigh]

I have another hub on the way. I guess I'll keep throwing hubs at it until I find something that works. I don't actually need the hub once it's up and running. I can SSH in to the computer. Raspberry Pi's customized Linux lets you put a file in the root directory that will let you access it remotely, but the Orange device's Debian variant doesn't seem to have that.

AndyJ

22 Feb 2024, 20:40

The Orange Pi customized Debian install could see the M.2 drive, but not the keyboard or mouse. After doing some web searching, I found that, for some demented reason, OP shipped some previous OS images with USB turned off in the kernel. The OP web site had a customized Arch version which I downloaded and burned to the SDcard. The Zero 3 booted, saw the M.2 and mouse, but not the keyboard. I unplugged the keyboard and plugged it back in, and it worked. It sees the filesystem on the M.2 drive and accesses the Internet.

Attempting to upgrade with pacman - I've never used Arch before - failed, saying it couldn't connect to nl.mirror.oranginfra.online. I tried pinging that directly and it failed.

The latest OS image from the OP server is dated November 2022, which is pretty old, in OS-release-years.

There's an "Orange Pi OS (OH)" on the site, whatever an "OH" is. I'll see how that one works.

[sigh] Welcome to AndyLand, where nothing ever goes wrong... goes wrong... gones worng...
Last edited by AndyJ on 23 Feb 2024, 02:12, edited 1 time in total.

Post Reply

Return to “Keyboards”