After having installed KMK on the previous page, you're going to want to click 'Download Project Bundle' on the file below. Unzip the file, copy kb.py to your CIRCUITPY drive and rename main.py to code.py and copy it to the CIRCUITPY drive as well.

# SPDX-FileCopyrightText: 2022 Eva Herrada for Adafruit Industries
# SPDX-License-Identifier: MIT

import board

from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
from kmk.matrix import DiodeOrientation


class KMKKeyboard(_KMKKeyboard):
    row_pins = (board.D5, board.D6, board.D7, board.D8, board.D9)
    col_pins = (
        board.A1,
        board.A0,
        board.SCK,
        board.MISO,
    )
    diode_orientation = DiodeOrientation.COLUMNS
    i2c = board.I2C

After you've copied everything over, your CIRCUITPY drive should look something like this.

Key Mapping

The default keymap for this macropad is the numpad keymap.

At this point, the keyboard should just work when you hit the keys. Feel free to mess around with the key maps. KMK has some good documentation on this process.

This guide was first published on Feb 01, 2022. It was last updated on 2022-02-01 16:38:52 -0500.

This page (Setting Up KMK) was last updated on May 24, 2022.

Text editor powered by tinymce.