Customizable Keypad Matrix (Use It As Shortcuts for PC)

The of the shelf Keypad Matrix is great but they only come in numeric or alphanumeric types. If you want to make a Keypad Matrix whose keys are designed for your needs then this is the Instructable for you.

In this Instructables, I will make a keypad matrix and then utilize it as a shortcut button for my PC.

Step 1: Supplies

  • Aluminum Foil
  • Arduino Pro Micro
  • USB Cable
  • Double-Sided Tape
  • Wires
  • A4 Sheets
  • Cutter
  • Some Printouts
  • Some 3D Printed Parts (Optional)

Step 2: How a Keypad Matrix Works?

Keypad Matrix const of the row and columns of conductive plates/pads and when you press and button the respective row and column pads get shorted.
The main advantage of the Keypad Matrix is that it helps in reducing the number of GPIOs utilized to read a large set of buttons for example for a 3 X 3 Matrix only 6 GPIOs are needed.

Step 3: Layers in a Keypad Matrix

There will be 5 layers in our Keypad matrix


Bottom Layer: It is the base layer upon which all the upper layers will stack up.

Bottom Conductive Row/Column: Either Row or Column Conductive Layer is Placed Above the Base Layer

Separation Layer: This will separate the Bottom Conductive layer from the Upper Conductive layer.

Upper Conductive Row/Column: Either Row or Column Conductive Layer is Placed Above the Separation Layer.

Top Layer: In this Layer, we will stick the custom Keys/Logos as per our needs.

Step 4: Print and Cut the Top & Bottom Layers

I have attached a PDF/SVG file that contains the marking for the bottom/top and separation layers.
Print the sheet and cut out the squares.
The shaded regions on Top and Bottom Layers are where the double side tape is going to be placed

The shaded region on the Separating Layers is needed to be cut out in order for the top and bottom to make contact when pressed.

Step 5: Add Conductive Layer

First, stick double-sided tape to the shaded region of the bottom layer then peal out the protective layer of the middle sections one by one and lay down wire such that only the strands of wire are on the double-sided tape then stick the tinfoil strips on the tape such that it covers the whole tape otherwise the layer will stick together leading to false button triggers.

Step 6: Separating Layer

If you are using the template for the Separating Layer from the previous file then you need to use it at least 7-8 times in order to create sufficient gaps between the top and bottom layers or otherwise you can also use the STL file to 3D Print the Separating Layer.
The notch on the side is to route out the wires which are connected to the top and the bottom layers.

Step 7: Paste Rest of the Layers

After attaching the separating layer prepare the top layer similar to the bottom layer and then paste it to the separating layer.
Route out the wires from the notch on the separating layer.

Step 8: Attach Headers

Now put 1cm of heat shrink on each wire and solder it with a female header.

Make sure to mark the wires of rows and columns. It will be better to use different color wires for rows and columns.

Step 9: Stand for the Keypad (Optional)

Practically the keypad is complete and usable but you can also 3D Print a stand for the Shortcuts Keypad for better accessibility.
On the left wall, there is a slot for USB output and on the top surface, there is a slot for inserting wires from the keypad matrix.
Insert the wire and stick the keypad matrix on top using double-sided tape.
connect the wire to Arduino Micro and fix the micro such that the USB aligns with the opening on the left.

Close the cover from behind using any board and four screws.

Note: the 3D print should be done such that the top surface is touching the build plate so no supports are needed.

Step 10: Stick You Custom Keys on the Keypad

Now stick the printout of custom keypads you designed for your needs on the keypad matrix.
I have included the SVG file for the one I have designed, you can use it as the template to place the icons of your choice and take the print out the.

You can also put some transparent protective layer on top of the print in order to keep it safe from dirty hands and paper tearing apart from repetitive usage.

Step 11: Let’s Code

We are going to utilize the Keypad Matrix library from Adafruit so, if you don’t have it then first install it from Menu->Sketch->Include Library->Manage Library.

First, we initialize the Keypad object with the number of rows and columns, pins associated with the rows and columns as well as a character value for each of the positions which will be used when the button is pressed.
Also for the shortcuts, we will be utilizing the Keyboard library for Arduino Pro Micro.
The code is well commented.
Here we initialize the Keyboard library by just .begin() function and then we can utilize .press() functional to press any key and .release() function to release any pressed key or .releaseAll() to release all the pressed keys at once.
A list of all special function keys like Ctrl, Alt, Escape, return, etc. can be found on this link.

Change the shortcuts in the switch case as per your own shortcuts.

Step 12: Add Shortcuts to Desktop

To add a shortcut for any application/folder/ webpage just right click and go to properties of the application and you will find a shortcut field, click here and enter your desired key for the shortcut.

Do note that you only need to press the key of your choice, Ctrl + Alt is by default present in the shortcut.

To add a shortcut to any webpage just right click and go to New -> Shortcut and paste the hyperlink to the desired webpage.

Step 13: Done

There you go, now you can enjoy your customized shortcut keypad matrix for easily accessing your favorite apps with just a button press.

If you have any queries regarding any part of the project please comment below, so I can try to resolve it.

Source: Customizable Keypad Matrix (Use It As Shortcuts for PC)


About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top