Introduction: HotKeys Keyboard With Custom Profiles

I hope you are doing good amid this Pandemic. Be Safe. Be Strong. #COVID19

Being an Industrial Designer, I need to access more than 7-8 software which includes Solidworks, Photoshop, Illustrator, Keyshot, Indesign, etc. on a daily basis and yes few games also. So, I experienced two issues from which this device comes to its existence.

  • Scattered Keys - The complete hand travels over the keyboard in search of a key that exists at the opposite corner like ESC and ENTER key. Similarly, there are more than 15 keys that I use only in Solidworks and those are scattered all around the keyboard. So, instead of changing my keyboard preferences, again and again, I looked for a mini keyboard that can be customized according my needs. After having some research I found plenty of designs and codes which can do this task easily. But as soon as I jumped on the second issue, I found that none of the design can eliminate that.
  • Different Functions - The second issue was when I switch the program, most of the keys swap their functions like Adobe Photoshop is doing zoom with ALT+Scroll but when I go to Adobe Acrobat, zooming is done by CTRL+Scroll. Similarly, I don't want most of the keys in Keyshot which I usually use in Solidworks. And, I never use arrow keys in Solidworks which are extremely required while gaming.

So, I decided to build a HotKeys keyboard with a Rotary Knob and a cheap LCD to alter between different programs with dedicated key mapping.

This Instructable is to simplify workflow and enhance productivity.

Let's hope you enjoy it and let's begin!

Step 1: COVID-19 Pandemic Lock-down - a Challenge to Source Components

The world is fighting with the COVID-19 pandemic and one-third of the population is under lockdown. In India, we are also isolated in our homes and there is no possibility to order components for this project as most of the commercial activities are halted. But, I have most of the components embedded in one or the other product.

I have a few damaged products, which includes:

  • TVS Gold Bharat keyboard for CherryMX Switches.
  • 12864 Reprap Smart Display for Rotary Encoder and Potentiometer.
  • LCD Module for 1602 LCD
  • Other few components are recovered from previous projects.

Step 2: The Design

Complete Project is designed in Solidworks while keeping all the parameters for additive manufacturing, using off the shelf-components.

Step 3: What Components We Need?

Electronic Components:

  • 1x Arduino Micro
  • 20x Cherry MX mechanical switch
  • 1x 1602 LCD Module
  • 1x Rotary Encoder

Hardware Components:

  • 3x M3x8 Bolts
  • 4x M3x5 Bolts

Tools:

  • 3D Printer
  • M3 Allen Keys
  • Soldering Station
  • Glue Gun

Step 4: FDM 3D Printing

I printed keyboard body on FDM 3D Printer

My FDM 3D Printer Settings:

  • Material (PLA)
  • Layer Height (0.2mm)
  • Shell Thickness (1.2mm)
  • Fill Density (20%)
  • Print Speed (60mm/s)
  • Nozzle Temp (210°C)
  • Support Type (Everywhere)
  • Platform Adhesion Type (None)

You can download all the files that are used in this project -

Step 5: DLP 3D Printing

I printed caps which required higher details and smoother surface on DLP 3D Printer

My DLP 3D Printer Settings:

  • Layer Thickness (0.05mm)

You can download all the files that are used in this project -

Step 6: Assembly of Switches in the Keyboard Body

To assemble the switches we will need following parts:

  • 1x Keyboard Body (3D Printed Part)
  • 20x CherryMX Mechanical Switches

As described in the images, snap fit all the switches in their respective places. No need of bolts or glue is required as designing is done with all tolerances and all the components gets fit on their own.

Step 7: Assembly of LCD in the Keyboard Body

To assemble the LCD we will need following parts:

  • 1x Keyboard Body (3D Printed Part)
  • 1x 1602 LCD
  • 4x M3x5 Bolts

As described in the images, install the LCD in the respective place and fix it using M3x5 bolts.

Step 8: Assembly of Rotary Encoder in the Keyboard Body

To assemble the Rotary Encoder we will need following parts:

  • 1x Keyboard Body (3D Printed Part)
  • 1x Rotary Encoder

As described in the images, install the Rotary Encoder in the respective place.

Step 9: Assembly of Arduino Micro in the Keyboard Body

To assemble the Arduino Micro we will need following parts:

  • 1x Keyboard Bottom Part (3D Printed Part)
  • 1x Arduino Micro

As described in the images, install the Arduino Micro in the respective place.

Step 10: Wiring

Follow the Schematic to wire all the electronics in the following way:

-----------------------------------------------
|    Arduino Micro    |      LCD Module       |
-----------------------------------------------
|         VCC         |         VDD           |
|         GND         |         VSS           |
|         D4          |    Register Select    |
|         D3          |      Read/Write       |
|         D2          |        Enable         |
|         A0          |        Data 4         |
|         A1          |        Data 5         |
|         A2          |        Data 6         |
|         A3          |        Data 7         |
-----------------------------------------------
-----------------------------------------------
|    Arduino Micro    |     Keypad Matrix     |
-----------------------------------------------
|         D9          |       Column 1        |
|         D8          |       Column 2        |
|         D7          |       Column 3        |
|         D6          |       Column 4        |
|         D5          |       Column 5        |
|         D15         |        Row 1          |
|         D14         |        Row 2          |
|         D16         |        Row 3          |
|         D10         |        Row 4          |
-----------------------------------------------
-----------------------------------------------
|    Arduino Micro    |    Rotary Encoder     |
-----------------------------------------------
|          D0         |        Pad_A          |
|          D1         |        Pad_B          |
|          GND        |         GND           |
-----------------------------------------------

Step 11: Arduino Micro Firmware

HID Interface Firmware

For communicating with the Laptop/Computer via HID interface we'll be using Arduino Micro's ATmega32U4 microcontroller.

QMK (Quantum Mechanical Keyboard) is an open source community centered around developing computer input devices. The community encompasses all sorts of input devices, such as keyboards, mice, and MIDI devices.

Instrunctions to follow:

  1. Clone the QMK firmware from GitHub.
  2. Prepare your build environment for compiling the firmware as instructed here.
  3. Download and extract the given custom keyboard firmware in the qmk_firmware/keyboards directory cloned in the first step.
  4. Compile the keyboard firmware using the following command:
    qmk compile -kb key5pro -km default
  5. Download and install QMK toolbox for flashing the firmware. (QMK Toolbox)
  6. Open QMK Toolbox and open the compiled firmware (.hex file) which can be found at qmk_firmware/.build directory, then select atmega32u4 as Microcontroller and check Auto-Flash option.
  7. Connect the Keyboard to PC via USB cable, now for flashing the keyboard put Arduino Micro into bootloader mode which can be done by shorting the RST pin to GND.
  8. After reseting the arduino, QMK toolbox automatically finds it and flash the firmware onto it.


Keymaps Customization

For customizing the keymaps, encoder functions, LCD functionality & profile management modify the key5pro/keymaps/default/keymap.c file.

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {};

This array contains the different layers of a keymap which can be used as different profiles. Each profile or layer can be set with different keycodes, macros or functions. (List of Keycodes)

void encoder_update_user(uint8_t index, bool clockwise);

This function callback will be excuted every time the encoder is triggered, this callback handles the functioning of the rotary encoder.

lcd_clrscr();               // clear the lcd
lcd_gotoxy(column, row);    // goto position
lcd_puts("");               // display data

These functions are used to operate the 16X2 LCD module which can be used to display the operation specific information to the user.

Step 12: Complete the Assembly

To Complete the assembly, we will need following parts:

  • 1x Keyboard Body(3D Printed Part)
  • 1x Keyboard Bottom Part (3D Printed Part)
  • 1x Rotary Encoder Cap (3D Printed Part)
  • 20x CherryMX Round Cap (3D Printed Part)

As described in the images, plug all the caps on switches and the rotary cap on encoder. Then, close the bottom part and fasten it with M3x8 bolts.

Step 13: And We're DONE !!

You're finally done! Here's how the final product should look and work like.

We're processing the video and will update it in next 24 hours.

Step 14: Please VOTE !

If you like this project, please vote for the "Trash to Treasure" Contest.

Really much appreciated! I hope you guys enjoyed the project!

Trash to Treasure Contest

Participated in the
Trash to Treasure Contest