Update 'CARDPUTER CircuitPython/keyboard_test.py'
This commit is contained in:
15
CARDPUTER CircuitPython/keyboard_test.py
Normal file
15
CARDPUTER CircuitPython/keyboard_test.py
Normal 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
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
from keyboard import Keyboard
|
|
||||||
|
|
||||||
keyb=Keyboard()
|
|
||||||
while True:
|
|
||||||
print(keyb.scan(), end="")
|
|
||||||
Reference in New Issue
Block a user