Macro Keyboard

Macro Keyboard with adjustable keys

Similar projects worth following
Shortcut keys takes a huge place on our computer usage. Some people use some macro keyboards for using shortcuts step by step and handle shortcuts easily which is harder to push. In this project I am trying to build a macro keyboard that have adjustables macros and it can be used even you do not have binding software.

Problems to build and solutions

1) Communication

Communication between computer and keyboard can be analyzed more than one side. One of the side is keyboard mode. If you need to simulate a keyboard
you need to have a microcontroller that have internal usb support or you can implement some virtual solutions like v-usb. In this project. I decided to choose microcontroller side but it can be expanded to other side too. Maybe in future virtual solutions can be added and overall cost might be decrased. 

Second side is sending the key bindings. I solve this problem with a library called pyserial and all transmission works kind like a handshaking method. When a data comes to the microcontroller, it pushes a message that coming message.

2) Key listening

Key listening side solved with keyboard library in python; but there is a point to tell library has some limitations that described in GitHub page and this project build and tested on Windows operating system. It might not work properly on different operating systems. I could not test other operating systems so I can not give any guarantee about that. 

3) Data storage

Key macros need to remember when device restart. This problem solved with using EEPROM inside of the microcontroller. EEPROM capacity changes controller by controller but in code you can change how many keys will be stored. I decided to give a upper limit at 30 keystrokes and if you push hotkeys like "ctrl+c" you need to add two more capacity except number of keystrokes because hotkeys has a start and end mark which value is two (not "2", ascii 2). All keys represent in a byte with "ISO 8859-9" encoding, and 16 keys with 30 bytes limit; you need to have 480 bytes space in your EEPROM to use this configration. You can change encoding, upper key limit, etc. too but if you post custom version do not forget to tag me ( :) ).

Warning: All of your applications at your own risk.
If you using this project for cheating you can be banned.

Makro Keyboard for

Macro adjusting software

x-zip-compressed - 57.84 kB - 08/10/2020 at 14:51



Code that need to upload into microcontroller

x-zip-compressed - 11.09 kB - 08/10/2020 at 14:51


  • 1 × Arduino Leonardo or an alternative microcontroller that have internal usb support
  • 1 × Keypad 4x4 keypad used in project
  • 8 × Jumper wires male to male

View project log

  • 1
    Step 1

    First of all you need to wire up your keyboard as described here and upload the skecth after you downloaded requirements which is described in project  GitHub page. 

    After that should reset your microcontroller EEPROM or disable read EEPROM function before adjusting, to do this you can uncomment clearEEPROM() or readEEPROM() comment and upload it into your Microcontroller. After, you can send your adjustments by using application. When bindings uploaded you can uncomment readEEPROM or comment clearEEPROM() function and upload skecth again. 

    All instruction above there maybe useless but if you faced with a problem this should be work. Still you have some problems about keyboard there some points that worth to check:

    1) Data transmission between microcontroller and PC: 

    This problems becomes different ways. They are probably comes from:

    a) Encoding Errors: When you send data to your microcontroller, encoding problems can be happen. I solve this problem change the encodings if you faced same problem too you can try to do this solution. When you push a button and it press bindings that you do not adjust it can be happen from here because it might be ignore your adjustment keys or show an error message.

    b) Transmission buffer problems: Project uses a method like handshaking because serial buffer sometimes misses value if you do not wait enough. If you want to increase transmission speed you can be face with this problem.

    2) EEPROM's status: 

    As it is discussed above you can reset your EEPROM if you have some issues.

    3) Restart your keyboard: 

    Sometimes all your problems can be solved unplug you keyboard and plug back in different port. 

    Note: If you are facing a problem like opening port on the computer. You can solve this by closing serial monitors that opened in programs.

View all instructions

Enjoy this project?



Nevyn He/Him wrote 01/12/2021 at 22:59 point

Speaking of Linux... I wrote some code a year or two back that allows you to plug in a second (whatever is laying around) keyboard and use that as a macro keyboard.

I'm about to play with expanding its functionality to allow it behave a little bit like a stream deck i.e. allow it to quickly send keypresses to particular applications (though it's probably going to have to be quickly focusing on different windows and then switching back to avoid compatibility issues).

  Are you sure? yes | no

Jonathas Barbosa wrote 08/18/2020 at 18:27 point

Hi, nice project! Have you think about using AutoKey to listen the keys?

  Are you sure? yes | no

Eren Terzioğlu wrote 08/18/2020 at 19:06 point

Hi, for this project I do not think to use AutoKey library because keyboard library feels more convenient. If you want to use this project on Linux, probably it need a little modification on hotkey dictionary.

Thanks for your positive feedback.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates