From dee1c1f7daf8863ba7a37d95df2fc42122f3cb44 Mon Sep 17 00:00:00 2001 From: Dave G Vigil Sr Date: Mon, 4 Mar 2024 14:43:56 -0600 Subject: [PATCH] Initial play with kb.py --- iris-kmk/kb.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/iris-kmk/kb.py b/iris-kmk/kb.py index e69de29..712512f 100644 --- a/iris-kmk/kb.py +++ b/iris-kmk/kb.py @@ -0,0 +1,28 @@ +import board + +from kmk.extensions.LED import LED +from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard +from kmk.scanners import DiodeOrientation + + +class KMKKeyboard(_KMKKeyboard): + col_pins = ( + board.GP2, + board.GP3, + board.GP29, + board.GP27, + board.GP6, + board.GP5, + ) + row_pins = ( + board.GP0, + board.GP1, + board.GP7, + board.GP16, + board.GP28, + ) + + diode_orientation = DiodeOrientation.COLUMNS + + leds = LED(led_pin=[board.GP27, board.GP28]) + _KMKKeyboard.extensions.append(leds)