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)