Skip to content

Commit 1903e3e

Browse files
authored
Merge pull request #613 from sz6084/main
Add Sammie's Scarapad
2 parents ff178c0 + 8536f38 commit 1903e3e

File tree

13 files changed

+21593
-0
lines changed

13 files changed

+21593
-0
lines changed
17.4 MB
Binary file not shown.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# You import all the IOs of your board
2+
import board
3+
4+
# These are imports from the kmk library
5+
from kmk.kmk_keyboard import KMKKeyboard
6+
from kmk.scanners.keypad import KeysScanner
7+
from kmk.keys import KC
8+
from kmk.modules.macros import Press, Release, Tap, Macros
9+
10+
# This is the main instance of your keyboard
11+
keyboard = KMKKeyboard()
12+
13+
# Add the macro extension
14+
macros = Macros()
15+
keyboard.modules.append(macros)
16+
17+
# Define your pins here!
18+
#PINS = [board.D3, board.D4, board.D2, board.D1]
19+
keyboard.col_pins = (board.D0, board.D1, board.D2, board.D3)
20+
keyboard.row_pins = (board.D7, board.D8, board.D9, board.D10)
21+
22+
# Tell kmk we are not using a key matrix
23+
#keyboard.matrix = KeysScanner(
24+
# pins=PINS,
25+
# value_when_pressed=False,
26+
#)
27+
28+
# Here you define the buttons corresponding to the pins
29+
# Look here for keycodes: https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/keycodes.md
30+
# And here for macros: https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/macros.md
31+
keyboard.keymap = [
32+
[KC.NLCK, KC.P7, KC.P8, KC.P9, KC.MEDIA_PREV_TRACK,
33+
KC.P4, KC.P5, KC.P6, KC.MEDIA_PLAY_PAUSE,
34+
KC.P1, KC.P2, KC.P3, KC.MEDIA_NEXT_TRACK,
35+
KC.P0, KC.PDOT, KC.PENT] # Media keys prev/next are windows-specific
36+
]
37+
38+
# Start kmk!
39+
if __name__ == '__main__':
40+
keyboard.go()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(fp_lib_table
2+
(version 7)
3+
(lib (name "OPL")(type "KiCad")(uri "${KIPRJMOD}/OPL_Kicad_Library/Seeed Studio XIAO Series Library")(options "")(descr ""))
4+
)

0 commit comments

Comments
 (0)