Add a short program to dump key information.
This commit is contained in:
parent
17bcf23de2
commit
76f9b495e2
1 changed files with 15 additions and 0 deletions
15
show-keys
Executable file
15
show-keys
Executable 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()
|
Loading…
Add table
Add a link
Reference in a new issue