My latest #BadKeyboard: The MCKeyb!

I built a keyboard in modded Minecraft, then hooked it up through a webserver and a wireless microcontroller, so it appears as a USB keyboard on a different computer. I then used it to post "Hello World!" to bluesky, from minecraft.

Video here:
https://bsky.app/profile/foone.bsky.social/post/3lfr32fijy22j

Foone (@foone.bsky.social)

My latest #BadKeyboard: The MCKeyb! I built a keyboard in modded Minecraft, then hooked it up through a webserver and a wireless microcontroller, so it appears as a USB keyboard on a different computer. I then used it to post "Hello World!" to bluesky, from minecraft.

Bluesky Social

Technical details:
So the minecraft side is relatively simple. It's 30 ComputerCraft computers running identical code that simply monitors the back of the computer for a redstone signal. When it sees one, it makes an HTTP call to localhost:3000/<COMPUTER ID>.

Computer IDs are simply the order in which I placed them down, and are effectively random.

that local webserver is a small Flask application:

It manages shift key state (since the keys don't know about each other, the "A" key can't know if it should send "a" or "A") by toggling an internal shift value when the shift key is pressed.
It translates the scankeys to ASCII values, and UDP's them to the microcontroller.

The microcontroller is a Raspberry Pi Pico W, running a simple arduino sketch that connects to the wifi and listens for UDP packets. When it gets one, it presses that key to the attached computer.

I ran minecraft on my main laptop (windows 10), and opened firefox to bluesky on my linux laptop, with the Pi-Cow plugged in via USB. It worked quite well, other than having to synchronize OBS across both computers to record this video.

this heavily minimalist keyboard can't type numbers or special characters other than space and !, but it can be trivially expanded: Simply place down another computer with a button on it in Minecraft, copy the code onto it (I did this using ComputerCraft floppy disks, because I'm Me), and then modify the Flask app to turn that new computer-id "scancode" into the proper ASCII value.

The modpack is ATM9:To The Sky with Alphabet Blocks by DragonSlayr15001 added:

https://modrinth.com/mod/alphabet-blocks

Alphabet Blocks - Minecraft Mod

A mod that adds decorative letter blocks

Modrinth

also this is the only keyboard I've built (so far) which has had filming paused due to llama.

(I'm in creative mode on peaceful, I didn't realize that left the wandering traders turned on)

@foone ...I just realized you could use a turtle to implement a scanning keyboard. Multiple and you could sort of have a (really slow) key matrix :3
@foone Ah, ComputerCraft my beloved :3
@foone This isn’t the network federation we want, but it’s the network federation we deserve

@foone Now my desire to show this cool project to my kid (and then having to rebuild it) and my desire to have a free weekend are no longer at odds.

I think I can order a pico now. 😁

Thanks for sharing and inspiration!

@foone It's like a rube goldberg machine, but most of it is invisible
@foone i did something like this a long while ago with /say command blocks and then by tail -f'ing the game's log with a python script. wasn't as polished as this tho lol

@foone now type the Bee Movie script with it.

I'm just kidding, I know how insanely tedious that will be. But still, great project.

@foone I don't know why it's only now that I thought to figure out how to pronounce this keyboard's string of letters,

but now I'm thinking,

"
Qwhere't'you YOP?
Ass duff FUGH jekyll;
Zux civ bunum,
.
"