Maker Pro
Maker Pro

Joystick keyboard

Brett Torbin

Aug 17, 2017
1
Joined
Aug 17, 2017
Messages
1
I'm trying to build a hobby project, a keyboard. I want to replace the keys with joysticks. For example, if there are 10 joysticks, push joystick 1 upwards for the letter W, down for X, left for A, right for D, and click for S.

Here is everything I think I need for the project. Do you think it can work?

Breadboard: https://www.adafruit.com/product/64
Wire: https://www.adafruit.com/product/288
Wire Strippers: https://www.adafruit.com/product/147
Joystick(s): https://www.adafruit.com/product/2765 or similar
Teensy controller:
https://www.pjrc.com/store/teensy_pins.html

I don't know too much about hardware, so my main concern is whether I'll be able to use the potentiometers on the joystick as simple Boolean on/off switches (to mimic the down/up action of a key in a regular keyboard).

Is it doable? Any advice or tips would be super appreciated.
 

kellys_eye

Jun 25, 2010
4,884
Joined
Jun 25, 2010
Messages
4,884
Joysticks that activate switch contacts are available - they would simplify the need to read an analog voltage and convert. You could also salvage an old standard keyboard and utilise the interface therein. They are all based on an X-Y matrix and easy to decode.

I've done this on a number of occasions with old USB/PS2 keyboards when I've needed a 'dedicated' set of push buttons for some PC-based systems I've made.
 

Braeden Hamson

Feb 18, 2016
236
Joined
Feb 18, 2016
Messages
236
Look into Joy to Key. Its a really sweet program that lets your joysticks emulate keypresses. If you want to build a controller I'd recommend using MMJoy2.

http://joytokey.net/en/
http://simhq.com/forum/ubbthreads.php/topics/3899105/4

The guys on the Eagle Dynamics forums input output section are really helpful. They like to make aircraft switch panels and custom joysticks (That's how I got into electronics) so if you want to build a joystick out of parts like you've mentioned I'd use an arduino programmed with MMJoy which talks to Joy to Key to emulate the keypresses.

Sounds like a really interesting project. That would take some getting used to.
 

Braeden Hamson

Feb 18, 2016
236
Joined
Feb 18, 2016
Messages
236
Also, why a potentiometer joystick? Perhaps a hat switch, would work better. They're like a thumbstick except its 4 buttons. I could see them working a little better for your fingers, perhaps you could 3d print some cups to put your fingers in so you can easily move them without slipping off a thumb stick. Also a hat switch has less of a throw so you don't have to move as far. A big issue with potentiometer based joysticks is their dead zones. So you would have to move say 5-10 degrees off center in order for the pot to even start reading versus 5-10 degrees total with a switch. Here's an example of a hat switch:

https://www.digikey.com/product-detail/en/e-switch/JS5208/EG4561-ND/1739634
http://www.leobodnar.com/shop/index.php?main_page=product_info&cPath=98_87&products_id=210
 
Top