thePretendgineer

The front fell off, an ADHD adventure

By: thePretendgineer
Why do they call it a 10 key when there's like 17? 18? ish? of them?

I need a 10 key

You would think this would be simple. Get on Amazon, search USB numpad, and buy the 3rd one down. It’s not though. They’re all terrible. (and also somehow expensive now?)

This one over here —-> Trash doesn’t even cover it. Linus Sebastian calls shit like this “manufactured e-waste”. He’s not wrong. This thing is legitimately useless. It runs on Bilbo Baggins logic. Half the keys work less than half the time and the other half work less than half as much as the first half.

I have a laser, a 3d printer, and a soldering iron. I’m pretty sure I can just make one that isn’t trash.

thePlan

1: Design the top plate to be cut out of whatever wood I have laying around.
2: Model the body.
3: Start the print so we aren’t waiting all day.
4: ChatGPT the shit out of the code for our little “Tiny RP2040” micro controller.
5: Solder a bunch of wires like a savage because temporary prototype. (lul)
6: Avengers

weekendUpdate¹

Prototype’s a thing I guess. It went significantly quicker than I thought it would.

I discovered that I don’t have any sort of prototype board material whatsoever, so that’s fun. I 100% would have rather put a board behind it and drilled out the holes for the nubs on the backs of the switches. It would have been WAY cleaner. Whatever, it’s a prototype that 100% won’t stay like this forever. It’s temporary

It’s so dumb, but I love this thing. I know it’s entry level as far as this stuff goes, but I don’t care. I had a legitimate need for the thing and it’s so nice having a 10 key back. I use them CONSTANTLY in web work. I just used it to add 30px of margin to the top of this text element. I love it, and these switches are amazing for cheap chinese temu garbage.

v2.0 - overComplication

It works, but let’s do this “the right way”. It would also be nice if the inside didn’t look like freddie kreuger went to town on a 1950s telephone exchange. Per-key GPIO is not the most efficient way to do this by any stretch, and a single ground wire instead of per key grounding is the way to go, but I didn’t want to go through the work of sticking the switches together like that for a temporary installation that I would be taking apart the next day(ish).

We should probably also figure out the whole LED situation. I have some specifically for keyboard switches coming that are common anode, which I’ve never worked with. Not a clue how that works, so FITFO it is. ChatGPT seems to think you can just straight up hook them to a GPIO and let it rip since the spicy bit’s carried on the cathode/+/source. I have my doubts, butt fuggit.

thePlan²

All of the things we did before, but this time add RGB LED support that turns on/off with the numlock key and has adjustable brightness on the numpad arrow keys with numlock as a modifier. Basically we make it a function key when held. We also need to make a new body that has more than 4 vertices. A chopped in half rectangle isn’t cutting it.

Oh yeah, and figure out silicone molding of custom shapes for the domed non-slip feet. That’ll be easy and totally not an entire project itself.
My idea there was basically those noctua fan “screws” that you pull through. That basic shape/idea/material. I’m thinking 3d print a 2 piece mold. Noctua’s brilliant on those, the sprue is functional. It’s the part that you pull through the case/fan and are meant to be cut off. Super smart use of material and it lowers cost. (one less manufacturing step)

weekendUpdate #1²

I should not be allowed near a hot glue gun.
That’s all, that’s the update. Moving on.

weekendUpdate #2²

I didn’t update last weekend after the hot glue gun comment because I had run into an issue that, honestly, pissed me off enough I kinda put the thing in a pile and decided I would start over.

I don’t give up easily at all, but I thought I had botched the soldering/shorted something and then covered it with about 3 sticks of hot glue. There was no way I was unfuckulating that mess.

The problem was this: Every single key worked except 1, enter, and period. Well, that’s not entirely accurate. 1 was 2, 2 was 3, 3 was enter, enter was 0, 0 was ., and . didn’t work.

I tried everything I could think of. My immediate thought was a short or bad solder joint. I spent about an hour trying to get hot glue out of the way enough to get to all the joints that it could possibly be. No dice. I tried several different complete from the ground up sets of prompts and complete rewrites with ChatGPT, Claude, Grok… Nothing. Same thing. I’m kinda shocked not a single one of them picked up on the actual issue.

how it's wired
how it acted

Now, a week later, I was sitting at my desk and I had a random thought.
I wondered if you needed to account for rows having an uneven number of keys.

These are a grid. Apparently you can’t have blank spots in the grid. Or if you do, you tell it there’s something there even if there isn’t. It’ll never be hit because there’s no switch at 3,4 or 5,2.

So, with that in mind, we do this:

# Keymap
keyboard.keymap = [
    [  # Layer 0
        # Row 1
        KC.NLCK, KC.PSLS, KC.PAST, KC.BSPC,
        # Row 2
        KC.P7, KC.P8, KC.P9, KC.PPLS,
        # Row 3
        KC.P4, KC.P5, KC.P6, KC.P1,
        # Row 4
        KC.P1, KC.P2, KC.P3, KC.ENT,
        # Row 5
        KC.P0, KC.P0, KC.PDOT
    ]
]

The tldr; is this: We make the rows even regardless of actual physical switches. The bottom row doesn’t matter because it’s at the end, but row 3 (4,5,6) does. It thinks that row actually looks like (4,5,6,1). To fix that, we tell it there’s a random (doesn’t matter what) key after the 6 key. We do the same on the last row because period is on column 3.

Save, watch as the MC restarts, hit the 1 key.

1 – GREAT SUCCESS!

v3.0 - letsBreakIt

I’m going to have to source some silicone, no idea how much it is or what kind I’ll need. (or what kinds there are for that matter)

I also don’t think KMK supports this type of RGB LED. I think it only supports neopixel type ARGB, so that’s fun.

The gist is I need to redo the entire damn thing in a way that isn’t bad, and that might just be per key GPIO and the basic arduino keyboard library or something. I honestly don’t care how “fancy” the shit is, I just want it to work.

Maybe I’ll look into that other keyboard library that I can’t remember the 3 letter name of. It’s all in C, but whatever.

Grok it up.

thePlan³

  • 1: Figure out the RGB situation
  • 2: Figure out custom 3d printed silicone molding
  • 3: Figure out power delivery over USB
  • 4: Figure out PCB design
  • 5: Figure out PCB milling with cheap chinese desktop CNCish
  • 6: Re model body to include USB breakout board/controller mount/curves
  • 7: profit?

End of Line

Useless Links

1 comment

  • A

    The V1/V2 combined raw timelapse build video (silent version) is up. I haven’t actually edited it to a proper length or done a voiceover yet, but I’ll get to it eventually.

Leave your comment

WTF is this 💩?

Oh look, you’ve stumbled onto my site.

This is where I document my random projects, questionable experiments, and whatever else I decide is worth posting. Is it organized? No. Is it always useful? Absolutely not. Is it regularly updated? Eh. But if you’re into chaotic tech builds and the occasional half-decent idea, you might just enjoy it here.

Feel free to stick around if you want to see what happens when ambition meets procrastination.

Welcome to the mess. You’ve been warned.