testing getting only down key events
This commit is contained in:
parent
8737ce1e4c
commit
a35ee174fc
@ -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__':
|
||||
|
Loading…
Reference in New Issue
Block a user