Makestation
Programmable key input devices - Printable Version

+- Makestation (https://makestation.net)
+-- Forum: Technical Arts (https://makestation.net/forumdisplay.php?fid=45)
+--- Forum: Technology & Hardware (https://makestation.net/forumdisplay.php?fid=29)
+--- Thread: Programmable key input devices (/showthread.php?tid=2336)



Programmable key input devices - SpookyZalost - February 26th, 2019

does anyone use programmable key input devices on their machines?

a while back I got a "broken" X key USB pro reprogramable 52 key pad...

finally got it working on 8 (stupid thing was stuck in hardware mode...)

but I'm beginning to see the perks of having a reprogrammable keypad/physical shortcut keys.

so I'm curious, does anyone else use them?


RE: Programmable key input devices - Thomas - February 26th, 2019

I've had numerous keyboards with shortcut keys and have never really found a use for them.


RE: Programmable key input devices - Lain - February 27th, 2019

My current mouse has 12 side buttons that I have bound to common shortcuts I use (ctrl-c, ctrl-s, etc. some macros here and there.)
I don't like how the software to program it is 400mb though (Corsair ICUE).
Was thinking of making something more like a numpad though once my new hardware arrives in the mail. Probably going to use either STM32 Nucleo32, Arduino Micro or Teensy for the backend, since they do support sending virtual keystrokes.


RE: Programmable key input devices - SpookyZalost - February 27th, 2019

ooh nice, yeah I was looking at some of the projects for DIYing your own programmable keypads, honestly it'd be kinda cool to use something like a numpad hooked up to an arduino for controlling things beyond a computer, like pressing a certain sequence of keys activates a pulsing pattern on lights strips in a specific area... or something like that.

Welcome to makestation by the way Lain.

I didn't realize we were connected to the wired Tongue


RE: Programmable key input devices - Lain - February 27th, 2019

(February 27th, 2019 at 6:13 PM)SpookyZalost Wrote: ooh nice, yeah I was looking at some of the projects for DIYing your own programmable keypads, honestly it'd be kinda cool to use something like a numpad hooked up to an arduino for controlling things beyond a computer, like pressing a certain sequence of keys activates a pulsing pattern on lights strips in a specific area... or something like that.

Welcome to makestation by the way Lain.

I didn't realize we were connected to the wired Tongue

You're not connected to the Wired, but the Wired is connected to everything Smile

But yes, honestly programming something like that is trivial, an interrupt with a jump table based on key, and mappings to keystrokes based on which key is pressed. Would take an hour at most, just for me to check documentation on interrupts and whatever high-abstraction library functions allow keystrokes.


RE: Programmable key input devices - SpookyZalost - February 27th, 2019

... awesome!

[Image: tenor.gif?itemid=3370080]


RE: Programmable key input devices - Lain - September 20th, 2019

Anyone have any experience with mech switches?
I want to upgrade my little macro keypad to something actually presentable instead of the pushbuttons I'm using right now. To do that, I'm considering two options:

The Adafruit Trellis (just the silicon 4x4 grid and maybe a case unless I can finesse something off my university's printer, not paying 30-60$ a kit)

Or a bunch of cheap mechanical keyboard switches or official CherryMX breakouts & switches.
Of course, it's going to involve lots of soldering.

The trellis might be a prettier option and I can probably figure it out much easier than mech switch datasheets, but was wondering if you guys have had any experience with either for the sake of actually building something.


RE: Programmable key input devices - SpookyZalost - September 20th, 2019

I would actually recommend an arduino.

you can program them to do anything at a low level, and I know for a fact that people have programmed them to do everything from DIY keyboard inputs to custom HOTAS setups.

however if you want to take it a bit further... ever consider building a circuit with something like a bus switch or something similar?

you could switch inputs by setting a pin from low to high with a mechanical switch thus activating your digital input/output.

I've been working on an AV switch using this principle with potential to be more than just AV, and my early tests have got a dual input audio switch working so far for less than $5 in parts.

using this principle what I would do would be to get a simple programmable Microchip, and use the bus switches to change information to pins using a mechanical switch, and power the whole thing off usb with the microchip sending the information through a USB bus chip.

in total, maybe $15 in parts, at most, including a case if you need one, a power regulator circuit, wires, and the mechanical switches, even LED's if you want them.

Edit: re-reading your post I see I missed the original intent.

honestly what your best bet is probably to look at how the macro pad is wired and see if you can find the signal leads, it shouldn't be that much different though, a key switch

failing that, it seems a lot of DIY mechanical switch boards use a teensy for programming.

you might be better off building a macropad utilizing a teensy or an arduino from scratch over modifying an existing one, I know it can accept inputs and outputs so you could in theory program it to record sequences fed through it, but you'd have to put it between your keyboard and your computer so it can capture the USB signals without dedicated software.

Edit: useful link!: https://www.makeuseof.com/tag/make-custom-shortcut-buttons-arduino/

either way you look at it, it's going to be a hassle though, and to use the existing one would require figuring out the input and output of the macro switches and the mechanical key switches, once you do that though it shouldn't be that much different regarding input/output variables.
the macropad is just recording on/off states caused by keys pressed down and from that button activating a saved keypress macro.

have I done this? no, but I've done research into converting cheap keyboards into mechanical ones so I can tell you a bit about the conversion process.

you'll also need to be aware of the resistance differences between the two types of keys, it's small but it builds up depending on how far you are from the actual brains of the device.


RE: Programmable key input devices - Lain - September 20th, 2019

(September 20th, 2019 at 3:09 AM)SpookyZalost Wrote: I would actually recommend an arduino.

you can program them to do anything at a low level, and I know for a fact that people have programmed them to do everything from DIY keyboard inputs to custom HOTAS setups.

however if you want to take it a bit further... ever consider building a circuit with something like a bus switch or something similar?

you could switch inputs by setting a pin from low to high with a mechanical switch thus activating your digital input/output.

I've been working on an AV switch using this principle with potential to be more than just AV, and my early tests have got a dual input audio switch working so far for less than $5 in parts.

using this principle what I would do would be to get a simple programmable Microchip, and use the bus switches to change information to pins using a mechanical switch, and power the whole thing off usb with the microchip sending the information through a USB bus chip.

in total, maybe $15 in parts, at most, including a case if you need one, a power regulator circuit, wires, and the mechanical switches, even LED's if you want them.

Edit: re-reading your post I see I missed the original intent.

honestly what your best bet is probably to look at how the macro pad is wired and see if you can find the signal leads, it shouldn't be that much different though, a key switch

failing that, it seems a lot of DIY mechanical switch boards use a teensy for programming.

you might be better off building a macropad utilizing a teensy or an arduino from scratch over modifying an existing one, I know it can accept inputs and outputs so you could in theory program it to record sequences fed through it, but you'd have to put it between your keyboard and your computer so it can capture the USB signals without dedicated software.

Edit: useful link!: https://www.makeuseof.com/tag/make-custom-shortcut-buttons-arduino/

either way you look at it, it's going to be a hassle though, and to use the existing one would require figuring out the input and output of the macro switches and the mechanical key switches, once you do that though it shouldn't be that much different regarding input/output variables.
the macropad is just recording on/off states caused by keys pressed down and from that button activating a saved keypress macro.

have I done this? no, but I've done research into converting cheap keyboards into mechanical ones so I can tell you a bit about the conversion process.

you'll also need to be aware of the resistance differences between the two types of keys, it's small but it builds up depending on how far you are from the actual brains of the device.

Using an arduino isn't optimal in the slightest lol. The only thing arduino has going for them over any other MCU on the market is their own language/HAL, IDE, and forums. I've got a couple STM32 boards lying around at a fraction of the size of an arduino uno that have clock speeds 8x faster than the atmega328p, only downside is that you need to use C/asm to program them, and not some derivative 'simplified' language (although they have a very extensively documented HAL.)

I'm using a Teensy already, mainly beause keyboard input support is already  pretty decent on the atmega32u4, or at least miles better than the 328p which generally relies on ps/2 or other host hardware to do anything related to non-serialized input.

The only issue I have right now is that the thing looks like frankenstein because it's still all connected to a breadboard for prototyping, and I want to make it actually presentable so I need to start soldering stuff and adding some 'real' non tactile-push-buttons, hence why I'm debating either actual mech switches or the Trellis/silicon pad.
I can take a few pics of it when I get home. It's definitely not something I can just bring to class or something without the whole building thinking I have a bomb.

I'm starting to think Trellis would be better because of all the cool RGB shit, not to mention it'll look a lot more unique than most people's macro pads, just don't know what the resistance will feel like, or exactly how it's wired up and built.

There's definitely more tutorials and stuff on the subject of soldering mech switches, but generally those guides use Gaterons or Kailhs instead of authentic cherryMXs which AFAIK need their own breakout board to do anything useful like anti-ghosting, but I could be wrong.


RE: Programmable key input devices - SpookyZalost - September 20th, 2019

@Lain, ah! in that case.

you already have a working circuit right?

have you considered making a PCB instead of ordering a pre-existing setup?

it would look a lot cleaner.

ntm, most libraries now have 3D printers, at least here they do...

have you considered designing a case to put it in to make it look better?


RE: Programmable key input devices - Lain - September 20th, 2019

(September 20th, 2019 at 5:22 PM)SpookyZalost Wrote: @Lain, ah! in that case.

you already have a working circuit right?

have you considered making a PCB instead of ordering a pre-existing setup?

it would look a lot cleaner.

ntm, most libraries now have 3D printers, at least here they do...

have you considered designing a case to put it in to make it look better?

Actually, I should just get a PCB, that's a good idea.
That being said, that'll only really handle the breakout board and wiring. I'd still need to solder in my own switches probably.
And no public libraries here have 3d printers (small town) but my school has a couple so I'll see if I can finesse one for free.


RE: Programmable key input devices - SpookyZalost - September 20th, 2019

@ lain, even if you just cram it all into a basic box case, something like that goes a long ways towards making an existing setup look better.