Making a custom keyboard with arduino?

Hey, this is my first post, and I've used the search to look for an answer, but I didn't see any similar questions, so forgive me if this has already been answered.

I am looking to build a custom keyboard, for personal use, and my first thought was to use arduino to manage it. I've got the materials problem solved, but I didn't know if Arduino was capable of managing a <70 key keyboard, and if so, could I have a fn key that changed the use of certain keys? (i.e. fn+1=f1) Also what would muti-press limitations be?

thanks in advance!

Using 17 pins, you can use keypad.h library to read a 72 key keypad.
Electrically arranged as 8x9, physically any way you want.
Probably easier to manage fn as seperate key not part of the keypad.
Multi-press, that would be managed in your sketch.
So 17 for matrix, fn key, and 2 pins for serial interface.

somkun:
but I didn't know if Arduino was capable of managing a <70 key keyboard, and if so, could I have a fn key that changed the use of certain keys? (i.e. fn+1=f1) Also what would muti-press limitations be?

Yes, you can use Arduino to make a full sized keyboard. I've helped a couple of people accomplish just that. The keypad library Arduino Playground - Keypad Library has default support for a 10x16 (160 key) keyboard.

Multi-press will have a problem called ghosting. That means if you press 3 keys in a triangle then a fourth key will also appear to be pressed. Release any one of the 3 keys and the ghost will go away too. Ghosting is normally solved by using individual series diodes with each key.

CrossRoads:
you can use keypad.h library to read a 72 key keypad.
[Snip]
Multi-press, that would be managed in your sketch.

Actually, the keypad library has been multi-press capable since July of last year. I didn't make an announcement yet because I was hoping for a relatively slow testing period. But it's posted and I'm working with someone right now who is implementing a full multi-press (a.k.a. n-key-roll-over, nkro) keyboard. As soon as I get a report from him I will upload the latest fixes (the last key wouldn't report that it was released). Shouldn't be more than a day or so.

Cool!

Thanks,

I know that 6 of the inputs are analog, should I use those for the keypad only, or can I use them for the fn key or serial interface? I intend to use cherry MX switches for my keys, according to the specs on the website, there are some with diodes and some without, should I get the ones with diodes, or should I get my own diodes?

The analogue input pins can also be used like regular digital input / outputs as well.
On a UNO they are pins 14 to 19.

somkun:
I intend to use cherry MX switches for my keys,

Wow, these things seem to be getting popular. Both you and the other person I'm working with are using those keys.

according to the specs on the website, there are some with diodes and some without, should I get the ones with diodes, or should I get my own diodes?

Time to learn a technique in engineering called tradeoffs. :wink: If the cost of the keys with diodes is higher than buying separate diodes then it may be worth your time to do it yourself. External diodes also mean your build won't be as neat and clean so that's another consideration.

But from a purely technichal point-of-view it would be better to get the ones with diodes.

mstanley:
Wow, these things seem to be getting popular. Both you and the other person I'm working with are using those keys.

yea, they're the best quality/cost switches I've found so far

one last question before I begin learning to build PCB's, How do I implement (physically) a mini-usb port so my keyboard can be plugged in and used (recive power and send keyboard signals)? I know that the Leonardo has a mini-usb already attached, can I just use that? if not, do I need to reroute power from the usb port to the power port on the uno?

somkun:
How do I implement (physically) a mini-usb port so my keyboard can be plugged in and used (recive power and send keyboard signals)? I know that the Leonardo has a mini-usb already attached, can I just use that? if not, do I need to reroute power from the usb port to the power port on the uno?

If you go to the main reference page on the Arduino site there is a link to Keyboard and Mouse for the Leonardo.
http://arduino.cc/en/Reference/MouseKeyboard

This tells you a bit about using your Leonardo as a USB keyboard. I haven't read any of it but it may give you enough information on using the Keyboard library.

Hello everyone,

I want to make a custom keyboard and many of its keys are "keyboard modifiers". By using the "keypad.h" library I have seen that the custom keypad is created from a char matrix. I would like to create a byte matrix where I could include the hexadecimal ASCII keys.

I think I could do this changing the library definition of the custom keypad. Has someone tried this?

Thank you in advance.

If you want to make a custom wireless keyboard (Which is mostly used for Youtubing)and it is easy too
Check Out this Post:
https://medium.com/arduino-community/diy-arduino-wireless-keyboard-be9ff73f246c @luis_mike