March 17, 2025, 19:29
python import time import board import digitalio from lib.kmk.kmk_keyboard import KMKKeyboard from lib.kmk.keys import KC led = digitalio.DigitalInOut(board.LED) b16 = digitalio.DigitalInOut(board.GP16) b17 = digitalio.DigitalInOut(board.GP17) led.direction = digitalio.Direction.OUTPUT keyboard = KMKKeyboard() while True: if b16.value or b17.value: led.value = True keyboard.tap_key(KC.A) print("pressed a") time.sleep(1) else: led.value = FalseI've also tried the example code:
python print("Starting") import board from kmk.kmk_keyboard import KMKKeyboard from kmk.keys import KC from kmk.scanners import DiodeOrientation keyboard = KMKKeyboard() keyboard.col_pins = (board.GP16,) keyboard.row_pins = (board.GP17,) keyboard.diode_orientation = DiodeOrientation.COL2ROW keyboard.keymap = [ [KC.A,] ] if __name__ == '__main__': keyboard.go()When I shorted the pins, in the serial it shows this debug info that it pressed the key and released the key. So in the serial, the output is fine, however when I'm in a text field it just doesnt send the button. The serial shows it works fine but the key is just not being sent? Has anyone encountered the same?