🎄🎄🎄Merry Christmas to you 🎄🎄🎄 Frohe Weihnachten Euch 🎄🎄🎄Joyeux Noël à toi 🎄🎄🎄Buon Natale a te 🎄🎄🎄 Vrolijk kerstfeest voor jou🎄🎄🎄 Feliz Navidad para ti 🎄🎄🎄 God jul till dig 🎄🎄🎄
This year I want to make you a small gift in a “different form of time”. 🎁
No - it is not a clock this year! This device will “save your time”, when you work on your MS Windows, Apple macOS or Linux computer. It can save you many minutes or even hours during the year, when you use it typing in different programs. 😁
Just add this additional keyboard to your MS Windows, Apple macOS or Linux computer and you can type on your usual keyboard manually as before and on this new 2nd keyboard with automatically for you typed phrases and actions too. =)
The here used “Arduino Pro Micro” board automatically gets detected as a usual keyboard on your computer and can be used in every application where you can place the cursor into. It just works the same as you would type all the letters and key combinations manually on your usual keyboard - but way faster and repeatable all the time. =)
This specific version of this customizable 16 button macro keyboard is an example and can be directly used by programmers. It comes with custom changeable key caps for the keyboard switches, with the .step file for the key caps included. I designed this device to be used for my C++ Arduino projects, but it would be able to use in your e.g. mail program or writing program as well, where you have to type the same text phrases on and on again. It also comes with some pretty handy shortcuts and actions to a few programs, I use really often and want to start them with a single click. So you will find some examples in the code to change it to your needs.
The provided code is intended to be used with MS Windows, but when you change the key combinations in the code, then it can to be used on Apple macOS or Linux systems as well. You just need to change the to send key combinations / keyboard layout according to your system. Links and examples are given in the code. I tested it in Linux Mint and Apple macOS Sequoia 15.1.1 already with the then working non-Windows specific keys some time and worked great too.
One small request to you: If you configure some useful phrases, which you think may be useful for other users too, please send them to me and I will try to add them as examples too. =)
You don’t need to install anything on the computer to use the keyboard. So this might work on your heavily functional locked company work computer too. ;-) Apple macOS 15.x just notifies you, that another keyboard was attached and then you can use it. =)
Hope you like this time saver. I used it a few weeks now to improve it and workes fine. 😊
1-click functions:
Switch:
Function:
1
Copy
2
Paste
3
Cut
4
Undo
5
if
6
else
7
for
8
switch case
9
do while
10
while
11
void function
12
array
13
Open MS Windows Explorer
14
Show MS Windows Desktop
15
Open PowerShell Terminal as Administrator
16
Open GitHub Desktop
Example outputs: ( inserted with the keyboard here of course ;-) )
Switch 1 to 4: Copy, Paste, Cut and Undo via CTRL+C, CTRL+V, CTRL+X and CTRL+Z
Switch 5 + 6: if + else:
if (var1 == var2) {
} else {
}
Switch 7: for loop:
for (int i = 0; i <= 5; i++) {
}
Switch 8: switch case:
switch (var) {
case 1: {
break;
}
case 2: {
break;
}
case 3: {
break;
}
case 4: {
break;
}
case 5: {
break;
}
}
Switch 9: do while:
do {
// some actions
} while (condition);
Switch 10: while:
while (condition) {
// some actions
}
Switch 11: void function:
void functionname() {
}
Switch 12: array:
int myarray[] = { 1, 2, 3, 4, 5 };
Switch 13 and 14: The MS Windows actions are done with the MS Windows hotkeys commands like “Windows key”+"e" for the MS Windows Explorer and “Windows key”+"d" to show the MS Windows Desktop and minimize all open windows.
Switch 15: The PowerShell Terminal window is opened as Administrator via the MS Windows Run function from the start menu. So you will find an example in the code how to do such more complex actions automatically too.
Switch 16: In this example is shown how to open any Windows application with a in its shortcut set key combination. Here CTRL+ALT+F5 was set in the GitHub application and then this key combination is called in the code to give you another example for this too:
Side note to this key 16 combination usage example: Today I received an automatic update of the GitHub application, which you might be familiar with too. These updates seem to create a new shortcut on the desktop too and after the update was done this key combination to start the GitHub application was gone. Therefore I added a per default inactive additional alternative method to the code to start GitHub then, which you can use instead or you would need to set the key combination again after such application updates. Just wanted to let you know…
These example codes should give you some ways how to automate your computer. =)
Code download:
Download the code from my GitHub repository and upload it t the board. The board should automatically detected and selected from the installed Arduino IDE.
You will need to add 1 extra library called “ezButton” manually to the installed Arduino IDE. How to do so is good explained here.
Details of how to change the code to fit to your requirements with several examples are included and described in the code, so that it should be really easy to follow and change.
Note: When you upload the code to the board once the code was uploaded it is possible that you get some red warning messages in the Arduino IDE like in the following picture. You can ignore these messages. The Arduino IDE shows these, because it recognizes the board after the 1st upload as a keyboard, which is correct. The upload will work anyway.
Wiring instructions:
Wiring this device is not complicated although you will need to solder. I could not find any keyboard switches that would allow a solder free solution. If you know such keyboard switches please let me know.
In the following pictures and table you will see the wiring which is really easy to do.
The 1st picture shows the pressed in 16 keyboard switches from the front:
The next picture shows the back of the switches with all connections to the Arduino:
In the picture you can see the complete wiring from the back.
Use the silver wire to connect 1 pin of each switch to the next switch like shown with the green line. Make sure that the silver wire does not make contact the other pin of each switch. Solder an insulated wire from the silver wire to the GND pin of the Arduino Pro Micro. I used the GND pin left from pin number 2.
All other numbers on the 2nd pin of each keyboard switch shows the corresponding pin on the Arduino Pro Micro. Simply connect 1 insulated wire from the 2nd pin of each keyboard switch to the pin number of the Arduino board.
Key switch number:
Pin on the Arduino Pro Micro:
One contact of each keyboard switch
Connect with the silver wire to the common GND
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
16
11
14
12
15
13
A0
14
A1
15
A2
16
A3
After the wiring is done, you just need to add a USB-C cable to the board and secure it in place with a cable tie on the 2 small holders of the base part near pin A3 shown in the 2nd last picture.
Secure the USB-C cable with another cable tie to the lid.
You can now close the case with the lid with the M3x8 screws.
Optionally add the “stand” part to the lid to be able to use the device in an 45° angle on your desk. See pictures for the orientation of the stand and the routed USB-C cable. Use the 2 M3 nuts and 2 M3x12 screws to combine the lid and stand part.
Next action is to upload the code and modify it to your needs. The electronics part is done now. Well done. =)
Key caps:
You will find a .STEP file to modify the key caps to your needs in the downlaod files here.
For the cutout of the symbols and the texts a simple negative 1mm extrusion was used.
For symbols I used free icons from the fontawesome library and imported them as SVG.
Print the key caps one by one to get the best results. See printing instructions for more details.
You will find the used key caps and 16 empty key caps in the .STEP file:
Solderable wires (to connect 1 pin of each keyboard switch to the common GND pin)
Printing instructions:
0.2 speed profile used
I used some old marble filament for the keycaps as shown which was not optimal. You can go definitely creative by selecting different color schemes. I will try this later too
Organic supports needed for the base part and back lid stand part only
No brim needed
Print the key caps separately to get the best results
I will reprint this case with the new option in Prusa Slicer 2.9: Paintable Fuzzy Skin
Textured sheet used:
If you use a textured sheet too, let it cool down completely after the print and wait for the part gets loose by itself. Do not pull on it to avoid ripping off the letters!
In my case it takes 30-45 minutes after the print has ended and the part just lays loose on the print bed.
Do not touch the print bed and clean it with Isopropanol alcohol before printing.