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