2020-12-21 22:04:48 -05:00
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
import keyboard
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def key_cb(key):
|
|
|
|
|
print(key)
|
|
|
|
|
|
|
|
|
|
|
2020-12-21 21:52:56 -05:00
|
|
|
def linux_keystroke_recorder():
|
2020-12-21 22:04:48 -05:00
|
|
|
keyboard.hook(key_cb)
|
2020-12-21 21:52:56 -05:00
|
|
|
print("Recording")
|
2020-12-21 22:04:48 -05:00
|
|
|
while True:
|
|
|
|
|
ch = sys.stdin.read(1)
|
|
|
|
|
if ch == "q":
|
|
|
|
|
keyboard.unhook_all()
|
|
|
|
|
break
|