Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added hackpads/Macropad/Cad/Bottom.stl
Binary file not shown.
Binary file added hackpads/Macropad/Cad/top.stl
Binary file not shown.
35 changes: 35 additions & 0 deletions hackpads/Macropad/Firmware/kmk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# import all of the IO for the board
import board

#imports from kmk
from kmk.kmk_keyboard import KMKKeyboard
from kmk.scanners.keypad import KeysScanner
from kmk.keys import KC
from kmk.modules.macros import Press, Release, Tap, Macros

# Keyboard main instance
keyboard = KMKKeyboard()

# Add the macro extension
macros = Macros()
keyboard.modules.append(macros)

# Define your pins here!
PINS = [board.D0, board.D1, board.D2, board.D3, board.D4, board.D5]

# Tell kmk we are not using a key matrix
keyboard.matrix = KeysScanner(
pins=PINS,
value_when_pressed=False,
)

# Here you define the buttons corresponding to the pins
# Look here for keycodes: https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/keycodes.md
# And here for macros: https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/macros.md
keyboard.keymap = [
[KC.W, KC.A, KC.S, KC.D, E, Release(KC.LCMD)),]
]

# Start kmk!
if __name__ == '__main__':
keyboard.go()
Loading