added keylogger

main
Pieterv24 2021-04-19 00:53:07 +02:00
parent 016ac7eed5
commit 2a6f43c6d4
2 changed files with 15 additions and 4 deletions

View File

@ -6,6 +6,6 @@ keyboard==0.13.5
macholib==1.14
pefile==2019.4.18
PyInstaller==3.4
PyQt5==5.9.2
PyQt5==5.15.2
https://github.com/danthedeckie/simpleeval/archive/41c99b8e224a7a0ae0ac59c773598fe79a4470db.zip
sip==4.19.8
PyQt5-sip==12.8.1

View File

@ -15,6 +15,8 @@ class MatrixTest(BasicEditor):
self.layout_editor = layout_editor
self.keyboardWidget = KeyboardWidget(layout_editor)
self.keyboardWidget.set_enabled(False)
self.startButtonWidget = QPushButton("Start testing")
layout = QVBoxLayout()
@ -43,8 +45,6 @@ class MatrixTest(BasicEditor):
return isinstance(self.device, VialKeyboard)
def matrix_poller(self):
# print(f"Rows: {self.keyboard.rows}")
# print(f"Cols: {self.keyboard.cols}")
rows = self.keyboard.rows
cols = self.keyboard.cols
matrix = [ [None for y in range(cols)] for x in range(rows) ]
@ -63,6 +63,17 @@ class MatrixTest(BasicEditor):
state = (row_data[col_byte] >> col) & 1
matrix[row][col] = state
for w in self.keyboardWidget.widgets:
row = w.desc.row
col = w.desc.col
if row < len(matrix) and col < len(matrix[row]):
w.setActive(matrix[row][col])
self.keyboardWidget.update_layout()
self.keyboardWidget.update()
self.keyboardWidget.updateGeometry()
def start_poller(self):
if not self.polling:
Unlocker.unlock(self.keyboard)