macro_recorder: utilize "keyboard" module for linux key recording

main
Ilya Zhuravlev 2020-12-21 22:04:48 -05:00
parent 000ad5d55c
commit 615ce6bdd7
5 changed files with 18 additions and 2 deletions

View File

@ -2,6 +2,7 @@ altgraph==0.17
fbs==0.9.0
future==0.18.2
hidapi==0.9.0.post3
keyboard==0.13.5
macholib==1.14
pefile==2019.4.18
PyInstaller==3.4

View File

@ -1,2 +1,17 @@
import sys
import keyboard
def key_cb(key):
print(key)
def linux_keystroke_recorder():
keyboard.hook(key_cb)
print("Recording")
while True:
ch = sys.stdin.read(1)
if ch == "q":
keyboard.unhook_all()
break

View File

@ -3,7 +3,7 @@ import lzma
import struct
from keyboard import Keyboard
from keyboard_comm import Keyboard
from util import chunks
LAYOUT_2x2 = """

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from hidproxy import hid
from keyboard import Keyboard
from keyboard_comm import Keyboard
class VialDevice: