I have a lot of boards and usually need to re-use code even for different projects.

keyboard_test.py 700B

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