Update 'CARDPUTER CircuitPython/keyboard_test.py'

This commit is contained in:
2025-03-05 11:48:43 +00:00
parent e247568aa8
commit abb9291ee3
2 changed files with 15 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
from keyboard import Keyboard
# Initialize keyboard object
keyb=Keyboard()
# Must be running on a loop
while True:
print(keyb.scan(), end="")
# This will print all keys and special, without special programming (backspace will print as BACKSP)
# end="" prevents the print statement from starting a new line every time, it isn't necessary
# It just makes it look more like a text editor and takes up less space
# The keyboard library is a work in progress and ALL keys/combinations aren't mapped yet.
# The most important ones are though, so it's useable in it's current state.
# Use this program or the text editor to find unknown codes and add them to the library

View File

@@ -1,5 +0,0 @@
from keyboard import Keyboard
keyb=Keyboard()
while True:
print(keyb.scan(), end="")