testing getting only down key events

This commit is contained in:
Nicholas Dyer 2023-12-21 08:46:59 -05:00
parent 8737ce1e4c
commit a35ee174fc
Signed by: ndyer
GPG Key ID: E5426C53DE17E1B2

View File

@ -4,8 +4,9 @@ import time
def main():
while True:
pressed_key = keyboard.read_key()
print(pressed_key.upper())
pressed_key = keyboard.read_event()
if pressed_key.event_type == 'down':
print(pressed_key.name.upper(), end='')
if __name__ == '__main__':