kmk_firmware/user_keymaps/klardotsh/twotwo_matrix_feather.py
Josh Klar 97091ff4fd
Make user keymaps fully declarative
This removes the need for the user to define... most things, honestly.
Notably, `main()` is no longer the end user's responsibility. This also
allows us to do fun stuff going forward like validating keymaps for
sanity (ex: the key assigned to `KC_MO(x)` should be assigned to
`KC_TRNS` on the target layer or the user will never be able to escape
that layer).

This also disambiguates `BOARD` to always refer to an actual slab of
silicon, renaming to `USER_KEYMAP`.

Entrypoints are now a bit more wild, and mostly-unsupported boards no
longer have working entrypoints. It's probably just time to scrap those
boards for now (until we have BLE HID and/or bitbang USB HID, at least).
2018-09-23 03:03:47 -07:00

29 lines
503 B
Python

from logging import DEBUG
import board
from kmk.common.consts import DiodeOrientation
from kmk.firmware import Firmware
def main():
cols = (board.A4, board.A5)
rows = (board.D27, board.A6)
diode_orientation = DiodeOrientation.COLUMNS
keymap = [
['A', 'B'],
['C', 'D'],
]
firmware = Firmware(
keymap=keymap,
row_pins=rows,
col_pins=cols,
diode_orientation=diode_orientation,
log_level=DEBUG,
)
firmware.go()