Git Keymap for ANAVI Macro Pad 8

Out of the box ANAVI Macro Pad 8 comes with the popular open source Quantum Mechanical Keyboard (QMK) firmware. In a previous blog post we covered it in more details and we had a look at the existing keymaps.

Recently, we added a brand new keymap for ANAVI Macro Pad 8 for Git users. Git is a free and open source distributed version control system started by the famous Linus Torvalds, the creator of Linux kernel. Nowadays, there are many offerings of Git repositories as a service by GitHub, GitLab, Bitbucket, etc.

The Keys

The Git keymap for ANAVI Macro Pad 8 contains the following shortcuts for Git. On the first row from left to right:

  • git status
  • git log
  • git pull
  • git push

On the second row from left to right:

  • git diff
  • git add
  • git commit
  • FN key to switch to the 2nd layout and control lights
ANAVI Macro Pad 8
ANAVI Macro Pad 8

How It Works?

From technical point of view for developers this Git keymap demonstrates a couple of interesting features of QMK firmware:

  • Typing words with a single key press
  • Reducing the QMK firmware size

In order to send commands like git log by pressing a single key, the Git keymap follows the QMK guidelines for custom keycodes.This keymap uses enum to define data type in the C programming language for all new custom keycodes. After that through function process_record_user and using SEND_STRING the text is send if a specific key on the macro pad is pressed. Details are available at QMK documentation and as an example directly in GitHub.

Using SEND_STRING in the Git keymap increases the total firmware size. This is dangerous because Microchip ATmega32U4, the microcontroller on ANAVI Macro Pad 8, may not have enough free space for it. If the firmware exceeds the size limit any attempts to flash it will fail with a similar error message:

The firmware is too large! 28866/28672 (194 bytes over)

If you run in such a use case, the easiest way to reduce the size of QMK firmware in a keymap for ANAVI Macro Pad 8 is to cut some of the default RGB lighting animations and effects. For example, as in the Git keymap, you can create config.h file in the keymap directory that overwrites the main config.h with a reduced number of supported RGB lighting animations and effects:

#pragma once

#undef RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_SNAKE

How to Flash It?

We have already covered in details how to install QMK firmware and how to flash a keymap from the command line in a previous blog post and in the user’s manual. Here is it in a nutshell for the Git keymap. Connect ANAVI Macro Pad 8 to a computer with USB to microUSB cable follow the steps below:

  • Execute the following command to compile QMK and the Git keymap for ANAVI Macro Pad 8:
qmk compile -kb anavi/macropad8 -km git
  • Execute the following command in a terminal to flash the git keymap:
qmk flash -kb anavi/macropad8 -km git
  • Press the RESET button on ANAVI Macro Pad 8 when asked:
Detecting USB port, reset your controller now.....
  • Wait until the firmware flashes successfully:
avrdude done.  Thank you.

ANAVI Macro Pad 8 is available at our distributors Crowd Supply and Mouser. We are constantly trying to improve this open source project and we are interested in finding more distributors around the world. If you have any questions please do not hesitate to contact us.

You may also like

Getting Started with QMK Firmware

Out of the box, all kits of ANAVI Macro Pad 8 are powered by the popular open source QMK firmware.

ANAVI Macro Pad 8
ANAVI Macro Pad 8

QMK stands for Quantum Mechanical Keyboard and it is an open source community centered around developing various computer input devices. The project is hosted in GitHub. More than 1700 developers contributed to this open source firmware over the years. QMK supports more than 2000 keyboards and keypads brands.

Although QMK is very powerful and flexible, it might be a challenge to get used to it if you haven’t used it before. Over the next weeks and months, as part of efforts for increasing the documentation related to ANAVI Macro Pad 8, we will be rolling out updates related to QMK.

QMK Configurator loaded in a web browser with the default keymap for ANAVI Macro Pad 8

QMK offers several options to select, customize and flash a keymap for your keyboard:

  • Command-line interface – advanced but not very user friendly
  • QMK Toolbox – application for MacOS and Windows users
  • QMK Configurator – an online tool used for easily creating firmware files for keyboards supported by QMK.

You can use QMK on MS Windows, MacOS and GNU/Linux distributions. To get started with the QMK firmware please explore this tutorial from the official documentation and install all required software suitable for the operating system on your PC.

Keymaps for ANAVI Macro Pad 8

The QMK source code for ANAVI Macro Pad 8 is available as part of the main repository in GitHub. So far there are 5 keymaps available:

  • Default – with 2 layers for demo purposes
  • KiCad – free software suite for electronic design automation which as used to design ANAVI Macro Pad 8,
  • Kodi – for the free and open source media player application,
  • OBS – for the popular open source video recording and live streaming software,
  • Zoom – for the popular video communication software.

Over the time we plan to extend the list with keymaps for other popular software applications. Please feel free to submit your favorite keymaps for ANAVI Macro Pad 8 to the QMK repository in GitHub!

Compile QMK for ANAVI Macro Pad 8

After installing QMK software on your computer, from the command line you can compile QMK firmware with the default keymap for ANAVI Macro Pad 8 using the following command:

qmk compile -kb anavi/macropad8 -km default

Flash QMK on ANAVI Macro Pad 8

Follow the steps below to flash the compiled QMK firmware to ANAVI Macro Pad 8:

  • Connect ANAVI Macro Pad 8 to your personal computer with USB to micro USB cable
  • Execute the following command in a terminal to flash the default keymap:
qmk flash -kb anavi/macropad8 -km default
  • Press the RESET button on ANAVI Macro Pad 8 when asked:
Detecting USB port, reset your controller now.....
  • Wait until the firmware flashes successfully:
avrdude done.  Thank you.

The heart of ANAVI Macro Pad 8 is Microchip ATmega32U4. It is an 8-bit microcontroller part of the AVR family. QMK relies on avrdude as the utility to download, upload and manipulate the firmware of these microcontroller.

Microchip ATmega32u4
Microchip ATmega32u4 on ANAVI Macro Pad 8

ANAVI Macro Pad 8 is available at our distributors Crowd Supply and Mouser. Please contact us if you are interested in wholesale orders or if you prefer shipping directly from the EU.

You may also like