Add a short program to dump key information.

This commit is contained in:
Eli Ribble 2021-08-25 22:55:13 -06:00
parent 17bcf23de2
commit 76f9b495e2
1 changed files with 15 additions and 0 deletions

15
show-keys Executable file
View File

@ -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()