ANAVI Macro Pad 8

by ANAVI Technology

Open source, programmable, eight-key keypad with backlighting, underlighting, and OLED screen

View all updates May 08, 2021

Git Keymap

by ANAVI Technology

Out of the box ANAVI Macro Pad 8 comes with the popular open source Quantum Mechanical Keyboard (QMK) firmware. In a previous tutorial 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

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 update 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.

Thank you again for using ANAVI Macro Pad 8! Stay tuned for more tutorials!

Thanks, Leon

About the Author

ANAVI Technology

AnaviTechnology  ·  AnaviTechnology  ·   Plovdiv, Bulgaria


$11,079 raised

of $1 goal

Funded! Order Below

Product Choices

$36

Maker Kit

A kit for anyone interested in using their own mechanical switches and keycaps. Requires soldering. Includes ANAVI Macro Pad 8 printed circuit board with Microchip ATmega32U4 (1) and WS2812B LED strip (1).


$44

Developer Kit

The ultimate solution! No soldering required. Includes ANAVI Macro Pad 8 printed circuit board with Microchip ATmega32U4 (1) and WS2812B LED strip (1), Gateron red mechanical switches (8), transparent keycaps (8).


$8

OLED Display

Mini 0.96" OLED I2C display, yellow-blue. For use with ANAVI Macro Pad 8.


$7

Acrylic Enclosure

Acrylic enclosure for ANAVI Macro Pad 8.


$10

Accessories: Switches, keycaps and red LEDs

Accessories for the ANAVI Macro Pad 8 Maker Kit: Switches, keycaps and red LEDs. (These accessories come included and pre-soldered for the Developer Kit.)

Credits

ANAVI Technology

Open source hardware created and powered by free and open source software


ANAVI Technology


Mouser Electronics

Recommended

Components and Hardware Sourcing

TME Electronic Components

Components and Hardware Sourcing

Comet Electronics

Recommended

Components and Hardware Sourcing

See Also

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects: