NOTE: I’m still updating the blog to publish all the documentation and files in both English and Portuguese. At the moment the best option for checking the whole build is by checking the project on Instructables: HacKeyboard, a mechanical keyboard built from scratch. This message will be erased as soon as I manage to complete the posts with all the info and files. Thanks and sorry for the inconvenience 🙂

Hi everyone! After some time away from the blog I’m finally back with a brand new project that I’ve been doing in the mean time (along with some other 3 or 4 projects that should be ready to publish soon 🙂 ). In fact, I’m using the project itself to write this post. I present to you the amazing, the fantastic, the magnificent… HacKeyboard!

Well, what exactly is HacKeyboard?

It looks like a computer keyboard, and it is, but not an ordinary one. It’s story and hidden functions add a lot more to it. “Under the hood” you’ll find that this keyboard has:

SMK Alps Mount switches: Yep, this is an NKRO (N-Key Roll Over) fully mechanical keyboard with good old SMK Alps mount switches. A single switch beneath each key gives you an amazing tactile and audible feedback of every keypress just like the old good keyboards from the 80s.

Yep, this is an NKRO (N-Key Roll Over) fully mechanical keyboard with good old SMK Alps mount switches. A single switch beneath each key gives you an amazing tactile and audible feedback of every keypress just like the old good keyboards from the 80s. Compact size: it has a tenkeyless format and Portuguese key layout.

it has a tenkeyless format and Portuguese key layout. Special commands to record up to 12 macros: if you work with spreadsheets and often have to repeat the same stuff in a lot of cells, fear no more because HacKeyboard will let you save up to 12 different key sequences, each up to 150 key presses. You’re a gamer and you want to shoot, jump, move to the side and reload with just one click? HacKeyboard has got your back on that; You’re a programmer and want to write your if, while, for structures automatically? HacKeyboard can do that too! Oh, and it’s all done by key commands without any software required. It’s all built-in!.

if you work with spreadsheets and often have to repeat the same stuff in a lot of cells, fear no more because HacKeyboard will let you save up to 12 different key sequences, each up to 150 key presses. You’re a gamer and you want to shoot, jump, move to the side and reload with just one click? HacKeyboard has got your back on that; You’re a programmer and want to write your if, while, for structures automatically? HacKeyboard can do that too! Oh, and it’s all done by key commands without any software required. It’s all built-in!. Internal Keylogger: Yup, You can log whatever you/someone who uses your keyboard writes. What can you do with what they write? I’ll leave that to your imagination! Just remember that with great power, comes great responsibility!

Yup, You can log whatever you/someone who uses your keyboard writes. What can you do with what they write? I’ll leave that to your imagination! Just remember that with great power, comes great responsibility! Internal USB hub: It has an additional micro USB connector to plug in one of those recent micro USB pen drives or any USB device by using a USB OTG cable.

It has an additional micro USB connector to plug in one of those recent micro USB pen drives or any USB device by using a USB OTG cable. Internal 8GB secret storage: well… now that I’m telling this it’s not secret anymore 😛 HacKeyboard has an internal 8GB USB flash drive that will never be seen by your computer unless you press a specific key combination. Perfect to store your secret photos/videos/documents.

well… now that I’m telling this it’s not secret anymore 😛 HacKeyboard has an internal 8GB USB flash drive that will never be seen by your computer unless you press a specific key combination. Perfect to store your secret photos/videos/documents. 4 LED illumination modes: HacKeyboard has a ring of RGB leds around it that can work in four different modes: static, rainbow, LED chaser (KITT style) and breathing. Also, you can customize your preferred color just by using keystrokes. Once again, no specific software needed. If you don’t press any key for a while, breathing mode is automatically activated.

HacKeyboard has a ring of RGB leds around it that can work in four different modes: static, rainbow, LED chaser (KITT style) and breathing. Also, you can customize your preferred color just by using keystrokes. Once again, no specific software needed. If you don’t press any key for a while, breathing mode is automatically activated. Fully open hardware/software: you can reprogram the microcontroller to change key combinations, add illumination modes, do whatever you think of (Challenge: add a mod to play 1D Pong in HacKeyboard 😉 ).

you can reprogram the microcontroller to change key combinations, add illumination modes, do whatever you think of (Challenge: add a mod to play 1D Pong in HacKeyboard 😉 ). Internal EEPROM: any macro or color configuration you make is stored in an internal EEPROM. You can unplug your keyboard and everything you saved will still be in the keyboard the next time you use it.

any macro or color configuration you make is stored in an internal EEPROM. You can unplug your keyboard and everything you saved will still be in the keyboard the next time you use it. USB-HID: It is a common USB-HID device, which means it uses a generic HID driver and works on Linux, Windows and Mac.

Oh, and should I mention that it was built using parts from old keyboards, making it very cheap to make? 🙂

Like the special functions? Here’s how to use them!

As previously mentioned, any of the special functions of the keyboard can be used without requiring any special software. Everything is done using key combinations. On the top right corner of this keyboard there is was the Pause/Break key, which maybe 99,9% of the current computer users never used nor know what is it used for. Well, I know what it can be used for but I don’t use it, so I replaced it with a Power key, the key that makes the magic happen in this keyboard. Once you press Power, the keyboard enters a power mode where you can use some other keys to use the special functions of the keyboard. Here’s the list of key sequences to use the special commands:

Save macros:

<Power>, <S>, <Fx>: This will make the keyboard activate the power mode and save a macro for position <Fx> (Fx can be any key from F1 to F12). Anything you type after this key sequence will be recorded for position <Fx>. To quit macro recording mode, just press <Power>.

Play macros:

<Power>, <Fx>: This will enter the power mode, play the macro stored in position <Fx> and exit the power mode mode.

Activate/Deactivate keylogger:

<Power>, <L>: This will enter power mode, activate/deactivate the internal keylogger and exit the power mode.

Play the keylogger log:

<Power>, <K>: This will enter the power mode, play the keylogger log and exit the power mode.

Activate/Deactivate the internal 8GB USB storage:

<Power>, <P>: This will activate/deactivate the internal 8GB USB storage and exit the power mode. It is advisable to first safely remove the USB device in the computer operating system.

Changing colors:

<Power>, <R/G/B>, <+/->: This will change the amount of Red/Green/Blue in the ring of LED’s. If you press <+> you will increase the chosen color component and if you press <-> you will decrease it.

This will change the amount of Red/Green/Blue in the ring of LED’s. If you press you will increase the chosen color component and if you press you will decrease it. After modifying the color you can cancel the operation by pressing <Power> and the LED ring will restore the previous default color or you can store the chosen color as the new default color. There are 4 colors that can be customized by pressing different keys: <C>: When you press this key you will chose the current color as the default color shown during normal keyboard usage. <D>: When you press this key you will chose the current color as the default color shown during power mode. <E>: When you press this key you will chose the current color as the color shown to signal that you entered the macro recording mode but have not yet chosen a position. <3>: When you press this key you will chose the current color as the color shown when you entered save mode and have chosen the macro recording position. Anything you type when this color is shown, is stored in the chosen macro position.

and the LED ring will restore the previous default color or you can store the chosen color as the new default color. There are 4 colors that can be customized by pressing different keys: To terminate the color configuration and return to normal keyboard usage, just press <Power>

Why on earth did I “waste” my time building it?

Well, some time ago I was given a small lot of old computers and computer peripherals and among the peripherals there was an old IBM Model M2 keyboard with buckling spring switch mechanism and Portuguese layout. The “click, click click” of the keys just made me remember the old keyboards that almost sounded like old typewriters. If you were born in the 80s or before you know what I’m talking about. The keyboard had a PS2 connector, which I plugged into an old desktop computer. It worked perfectly and I thought my usual desktop keyboard was just going to be replaced as soon as I manage to buy a USB to PS2 adapter. However, once I got one and tried it I became disappointed because the “<>” key didn’t work. I got another converter and no luck either. Maybe those converters aren’t just made to be used with keyboard with Portuguese layout.

In the meantime, I started to investigate a little more about keyboards and found out that there are communities like GeekHack and Deskthority with endless discussions about mechanical keyboards: new products, vintage keyboard collections, keyboard mods, DIY keyboards, etc. Who would have guessed? While browsing those forums I just saw some amazing tenkeyless compact mechanical keyboards and then I just decided that I wanted to get one! However, I soon became disappointed to find out that at that time there wasn’t a single Portuguese tenkeyless keyboard being manufactured. It seems like the Portuguese market is to small to be profitable enough for manufacturers. Even when talking about normal mechanical keyboards with Portuguese layout, I think there are only 3 or 4 and only half of them have a real Portuguese layout since the others seem to have been adapted from another language because some keys have a different size and a few symbols are in different positions. Only recently the Ozone Strike Battle (which seems cool, but not so cool as HacKeyboard, of course 🙂 ) became available and although it is said to be available with a Portuguese layout, I wasn’t able to verify if it was really a PT-PT layout or some adapted one. Oh!… and there’s a common thing with mechanical keyboards… they’re pretty expensive!

So, I found myself in the situation that I really wanted a product that I couldn’t buy anywhere at that time. It seemed like the end of the road, but it wasn’t… We live in an era where information is freely available online and digital fabrication tools are making their way into the homes of common people. As a Maker, the solution as simple: “I’ll just make my own”, I decided.

Are you enjoying this project? Follow the link to continue reading and for the full set of photos of the build: [HacKeyboard, an open hardware mechanical keyboard – part II]

Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! 🙂