HotKeys Keyboard With Custom Profiles

7,628

131

38

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

Be the First to Share

    Recommendations

    • Fruit and Veggies Speed Challenge

      Fruit and Veggies Speed Challenge
    • Fandom Contest

      Fandom Contest
    • Metal Contest

      Metal Contest

    38 Comments

    0
    MattTuck
    MattTuck

    18 days ago

    When I navigate to .build, there's no .hex file. I've downloaded key5pro.rar, unzipping it, dropping it into the keyboard directory, and getting an error when I try to compile.

    Thoughts?

    Screenshot 2021-07-18 044213.pngScreenshot 2021-07-18 044240.png
    0
    nicholasjbechtel
    nicholasjbechtel

    Question 2 months ago

    May we use these 3D files and get them printed elsewhere? For those of us who do not own a 3D Printer.

    0
    Maxaye
    Maxaye

    10 months ago

    Hi, I've finished all of the hardware setup but am stuck on the programming side of things. MSYS2 is failing in every direction for me and when trying to set up the build environment it is telling me that the repository is down. Does someone have the firmware file compiled so I can just use QMK Toolbox and finish see if the keyboard even works? If you need more information in order to assist me I will gladly supply what I can. I appreciate it!

    Capture.PNGCapture1.PNG
    0
    FabroLabs Technologies
    FabroLabs Technologies

    Reply 10 months ago

    Hey Maxaye,
    I would recommend you to use WSL for windows, for firmware compilation as it is easy to setup the qmk environment there. Try to compile it yourself, as it will help you configuring the firmware according to your needs.

    0
    Maxaye
    Maxaye

    Reply 4 months ago

    Hello. I've had no success with being able to compile it myself. Is there anything you can provide me to get a working keyboard? Can I contact you on discord? That may be easier for back and forth communication. Thanks

    0
    Maxaye
    Maxaye

    Reply 4 months ago

    This is my newest issue. It looks like it is sending stuff to the arduino however I don't think there is anything in the file that it is sending. Hex file is 1kb and looks like such - included.

    eawf.PNGsdf.PNG
    0
    Maxaye
    Maxaye

    Reply 4 months ago

    Okay reinstalled everything and I think the issue was I never finished the install of QMK. Anyways, heres the new error. Don't know what to do here.

    ggg.PNG
    0
    Maxaye
    Maxaye

    Reply 4 months ago

    Alright so this is the latest piece I have. I installed those dependencies and then it seemed to have worked. Was able to compile a .hex file and proceed to flashing. After some trial and error I got this message. I didn't do anything to the base .hex file. Is there anything on that base .hex and config files? After flashing, the keyboard had nothing on the screen and didn't do anything. Was wondering if this is correct and what the next steps were (if I don't figure it out before then).

    ses.PNG
    0
    Maxaye
    Maxaye

    Reply 10 months ago

    Alright I'll give that a shot and let you know how it goes. Thanks for the recommendation.

    0
    Maxaye
    Maxaye

    Reply 8 months ago

    Alright I believe I've made some headway with this project. I reinstalled the MSYS2 and was able to configure it according to the instructions. I was able to get to step 7 and I believe I was able to upload the firmware to the Arduino however I am unable to verify and when plugging it back in, I get the following error: The I/O operation has been aborted because of either a thread exit or an application request (picture included). Now when I plug in the keyboard all it does is power the Arduino and screen on. I am unable to get anything from clicking the buttons. Where do I go from here? Thanks!

    0
    Maxaye
    Maxaye

    Reply 8 months ago

    Picture I forgot to include:

    Capture.PNG
    0
    Tigerchen
    Tigerchen

    Reply 6 months ago

    I'm not sure your flashing worked
    Your screenshot says the QMK Toolbox could not find the Board

    The Pro Micro is a bit picky in terms of 'Getting it into Flashing mode'

    You have to 'double Tap' the Reset-GND pin

    0
    Njd13
    Njd13

    1 year ago

    Any details on the diodes used? Did not mention them in the list of items needed.

    0
    phinguyen9
    phinguyen9

    Reply 1 year ago

    I think you can use 1N4148

    0
    Tigerchen
    Tigerchen

    Reply 1 year ago

    Been there, done that XD
    I'm Typing on my Dactyl right now.
    It's still not finished... I want to add a SSD1306 on each side
    But my Pro Micro doesn't have any free Pins left U_u
    So I have to swap it for a Proton

    0
    Njd13
    Njd13

    Reply 1 year ago

    Just finished a hot swap choc corne... and have 6 other model pcbs.... it’s way too addictive lol. Thank god I have a couple 3D printers so I don’t have to shell out for cases... I think I will sell them when I am done but will keep the Sinc I just got. I need to get out before I go broke....

    0
    Tigerchen
    Tigerchen

    Reply 1 year ago

    choc corne O_o nice

    I got the OLED mod idea for the Dactyl from that kb, position and all.
    I want to FINISH my Dacryl before I start with the next kb lol

    A few days ago I started CNC Milling some Palmrests for my Dactyl
    2. Coat of Oil today...
    I want to add a Magnet so they wont slip away to easily :P

    0
    Njd13
    Njd13

    Reply 1 year ago

    Yep found the answer a day after my post. Have completed a couple of these... then fell down the rabbit hole and have handwired a planck, a dactyl manuform, and so on...

    0
    DottJ
    DottJ

    1 year ago

    Hi! compliment for the project! I download the Key5pro.rar but the file appears to be damaged. When I extract it with winrar I get a damaged archive error. You could verify?
    Thank you