Author Topic: Autohotkey Keypad with USB Controller and NES Case  (Read 5425 times)

0 Members and 1 Guest are viewing this topic.

Offline Questengine

  • Thread Starter
  • Posts: 26
    • Heroglyphix Nonogram Logic Puzzles
Autohotkey Keypad with USB Controller and NES Case
« on: Wed, 31 August 2016, 08:11:20 »
Back in my intro post several weeks ago I mentioned making a Max Falcon 8 Style keypad out of an old credit card, and that project moved along pretty well, until I discovered I could use all my extra switches and bring an old Nintendo collectable out of storage into every day use. (you can actually see the pseudo falcon in the top of the first pic)

I had to cut through the case of course, first with a large drill bit and then making the final adjustments by hand with a pocket knife to fit the MX switches as close as possible.

When I got my ergodox, I got a full set of 104 (or however many) keycaps from Max Keyboards, and I got the function row keys in different colors just hoping that I'd someday have an excuse to use them on something.  I guess if I'd have known what I was going to do, I might have selected different colors, but for a first run I think this looks fine

The USB controller here is only about $12 and you can get them on ebay or amazon, and they come with the wires and connectors for sanwa buttons, which is great if you're building a hitbox (pics of that later).  But I removed the connectors and stripped the wires and soldered to my MX switches.  The computer reads it as a "generic usb" device so it doesn't interfere with your keyboard AND you can have AutoHotKey pick up the keystrokes as "Joy1...32" so you can assign autohotkey functions to single keystroke, no modifiers required.

So I tried to think of things that I wanted to have a single unmodified keystroke for, and that's actually not easy... I mean, how much trouble is it to hold a modifier?  And I already have copy, paste, save-all and undo on dedicated unmodified keys on my Ergodox....So here's what I've settled on so far:

Obvious stuff- volume up, down and play/pause

Code stuff- Most of these are for cleaning up code in visual studio.  Generally I don't even have to click the mouse, I just hover over the line of code and hit the key, the autohotkey script does the click at the current mouse position, then the rest of the work on that line: Delete entire line, add comment at beginning of line, fold/unfold code block, switch from VS to Unity and run the app, add a block comment and put the cursor in the middle so I can start typing there

Other stuff-switch to steam, toggle speakers and usb headphones

Silly Stuff- Start Rocket League, the most important button!

That does leave me a few buttons unassigned if anyone has any ideas.  Especially for VS shortcuts I'm not using enough of. I'm open to suggestions.

Next to my Ergodox.  It's portable so this isn't it's permanent home, but it works for now.
« Last Edit: Wed, 31 August 2016, 08:24:21 by Questengine »

Offline xtrafrood

  • formerly csmertx
  • * Elevated Elder
  • Posts: 2715
  • Location: Gainesville, FL
  • wildling
Re: Autohotkey Keypad with USB Controller and NES Case
« Reply #1 on: Wed, 31 August 2016, 13:32:36 »
So much magic happening right now :)

Offline romevi

  • Formerly romevi
  • * Exalted Elder
  • Posts: 8942
  • Location: The Windy City
Re: Autohotkey Keypad with USB Controller and NES Case
« Reply #2 on: Wed, 31 August 2016, 13:33:21 »
RIP completely useful NES case.

Offline xtrafrood

  • formerly csmertx
  • * Elevated Elder
  • Posts: 2715
  • Location: Gainesville, FL
  • wildling
Re: Autohotkey Keypad with USB Controller and NES Case
« Reply #3 on: Wed, 31 August 2016, 13:51:25 »
RIP completely useful NES case.

Mr. Negative over here. It's OBVIOUSLY useful as a keypad :p

Offline jakejake

  • Posts: 5
  • Location: Chicago
    • Jacob Stanton - Industrial Designer
Re: Autohotkey Keypad with USB Controller and NES Case
« Reply #4 on: Thu, 01 September 2016, 10:03:48 »
I didn't know AHK could interpret other devices like joysticks, that's really neat! I built something similar with one of those mx switch samplers and an adafruit trinket, but you need to get the device to send modifiers since it is interpreted as a keyboard.

What is the name of the controller you are using?

Offline Questengine

  • Thread Starter
  • Posts: 26
    • Heroglyphix Nonogram Logic Puzzles
Re: Autohotkey Keypad with USB Controller and NES Case
« Reply #5 on: Thu, 01 September 2016, 11:25:14 »
It's listed as this on Amazon: "Reyann Zero Delay Arcade USB Encoder Pc to Joystick for Mame Jamma & Other Pc Fighting Games"

AHK can actually read up to 16 joy sticks at once, so you could have multiple ones of these all plugged in, and AHK reading everything.  I've got two more in the mail from ebay and I'm going to try and build some pedals with one.
« Last Edit: Thu, 01 September 2016, 11:27:48 by Questengine »

Offline jakejake

  • Posts: 5
  • Location: Chicago
    • Jacob Stanton - Industrial Designer
Re: Autohotkey Keypad with USB Controller and NES Case
« Reply #6 on: Thu, 01 September 2016, 23:40:29 »
Thanks, I'll probably order one to tinker with