Add a short program to dump key information.
This commit is contained in:
parent
17bcf23de2
commit
76f9b495e2
|
@ -0,0 +1,15 @@
|
|||
#!env python3
|
||||
import keyboard
|
||||
|
||||
def main() -> None:
|
||||
keyboard.hook(_on_event)
|
||||
try:
|
||||
keyboard.wait()
|
||||
except KeyboardInterrupt:
|
||||
print("End.")
|
||||
|
||||
def _on_event(event: keyboard.KeyboardEvent) -> None:
|
||||
print(event.to_json())
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue