12 Button Macro Keyboard with printable Keycaps
prusaprinters
<p>Macro Keyboard powered by Arduino Pro Micro with printable relegendable keycaps.</p><p>Buttons are a remix, I adjusted them to better fit my MX switches.</p><p><strong>Requirements:</strong><br>- 4x M3 x 16mm Screws (M3 x 18mm also works)<br>- 12x MX Switches<br>- 1x Arduino Pro Micro (5V)<br>- 1x Micro-USB Cable</p><p><strong>Instructions:</strong><br>- Insert the 12 switches into the top<br>- Solder a cable through all buttons and solder it to one of the GND pins on the Pro Micro<br>- Solder each button to a digital pin of the Pro Micro<br>- Flash the program onto the Pro Micro<br>- Insert USB Cable into the bottom of the case and in the Pro Micro<br>- Put the case together, screw in the screws, they will hold without any nuts</p><p><strong>Print Settings:</strong><br>- Top Case: 0.2mm, no support, 15% infill<br>- Bottom Case: 0.2mm, no support, 15% infill<br><br>- Top Keycap: 0.15mm, 0.2mm first layer, no support, 15% infill (I used <br>Prusament PLA Vanilla White, it's nearly transparent with only 1 bottom layer)<br>- Bottom Keycap: 0.15mm, 0.2mm first layer, no support, 15% infill<br><br><strong>Labels:</strong><br>- Size: 15.75mm x 15.75mm or 16mm x 16mm with rounded corners</p><p><strong>Source Code:</strong></p><pre><code class="language-c">#include "Keyboard.h" #define buttonCount 12 const byte KEYPAD_0 = 234; const byte KEYPAD_1 = 225; const byte KEYPAD_2 = 226; const byte KEYPAD_3 = 227; const byte KEYPAD_4 = 228; const byte KEYPAD_5 = 229; const byte KEYPAD_6 = 230; const byte KEYPAD_7 = 231; const byte KEYPAD_8 = 232; const byte KEYPAD_9 = 233; const byte KEYPAD_ASTERIX = 221; const byte KEYPAD_ENTER = 224; const byte KEYPAD_MINUS = 222; const byte KEYPAD_PERIOD = 235; const byte KEYPAD_PLUS = 223; const byte KEYPAD_SLASH = 220; int keyPin[buttonCount] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16}; //int keyCode[buttonCount] = {KEY_F14, KEY_F17, KEY_F20, KEY_F23, KEY_F13, KEY_F16, KEY_F19, KEY_F22, KEY_F24, KEY_F18, KEY_F15, KEY_F21}; int keyCode[buttonCount] = {KEYPAD_ASTERIX, KEYPAD_8, KEYPAD_5, KEYPAD_2, KEYPAD_SLASH, KEYPAD_7, KEYPAD_4, KEYPAD_1, KEYPAD_3, KEYPAD_9, KEYPAD_MINUS, KEYPAD_6}; bool keyState[buttonCount] = {false, false, false, false, false, false, false, false, false, false, false, false}; void setup() { pinMode(2, INPUT_PULLUP); pinMode(3, INPUT_PULLUP); pinMode(4, INPUT_PULLUP); pinMode(5, INPUT_PULLUP); pinMode(6, INPUT_PULLUP); pinMode(7, INPUT_PULLUP); pinMode(8, INPUT_PULLUP); pinMode(9, INPUT_PULLUP); pinMode(10, INPUT_PULLUP); pinMode(14, INPUT_PULLUP); pinMode(15, INPUT_PULLUP); pinMode(16, INPUT_PULLUP); Keyboard.begin(); Serial.begin(115200); } void toggleKey(int index) { if (digitalRead(keyPin[index]) == HIGH && keyState[index]) { keyState[index] = false; Keyboard.release(keyCode[index]); Serial.print("Release Button Index - "); Serial.println(index); } else if (digitalRead(keyPin[index]) == LOW && !keyState[index]) { keyState[index] = true; Keyboard.press(keyCode[index]); Serial.print("Press Button Index - "); Serial.println(index); } } void loop() { for (int i = 0; i < buttonCount; i++) { toggleKey(i); } }</code></pre><p>With the default code you will map the numpad onto the keys. You can also use F13 - F24, but not all software/games supports these keys. (e.g. GTA 5 only F1 through F15, CSGO only F1 through F12)</p><p><strong>Counter-Strike Global Offensive Config:</strong></p><pre><code class="language-plaintext">bind "KP_SLASH" "buy m4a1; buy ak47;"; bind "KP_MULTIPLY" "buy vest; buy vesthelm; buy defuser;"; bind "KP_MINUS" "buy flashbang;"; bind "KP_HOME" "buy molotov; buy incgrenade;"; bind "KP_UPARROW" "buy smokegrenade;"; bind "KP_PGUP" "buy hegrenade;"; bind "KP_LEFTARROW" "buy p90;"; bind "KP_5" "buy sg556; buy aug;"; bind "KP_RIGHTARROW" "buy awp;"; bind "KP_END" "buy fiveseven; buy tec9;"; bind "KP_DOWNARROW" "buy elite;"; bind "KP_PGDN" "buy mp7;";</code></pre><p><strong>Credits:</strong><br>Original Keycaps - <a href="https://www.thingiverse.com/Mc_gee">Mc_gee</a> - <a href="https://www.thingiverse.com/thing:3791028">https://www.thingiverse.com/thing:3791028</a></p>
With this file you will be able to print 12 Button Macro Keyboard with printable Keycaps with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on 12 Button Macro Keyboard with printable Keycaps.