AceCentre / MorseWriter

Small app to convert 1 or 2 key presses from morse into text and keyboard-mapped keys
23 stars 4 forks source link

Stuck.. #30

Closed willwade closed 6 months ago

willwade commented 6 months ago

Im popping this here as a reminder.

I've spent a little while refactoring heavily the code for this. The aim really was

  1. Ditch pyHook and win32 - pyHook is a real pain to install.
  2. Ditch pressage. That too is a bitch to build.

So I havent got there. Because as @hosseinamin knows - pyHook was the most reliable way of hooking into keyboard events AND blocking reliably. But we have I, think, successfully moved away from pressage - to pressagio (a python port)

See my post on SO https://stackoverflow.com/questions/78381199/prevent-specific-key-presses-from-being-sent-to-foreground-app-using-pyqt5-and-p?noredirect=1#comment138183597_78381199

Basically I cant block key events from system wide.

So heres my new thought

see my work at https://github.com/AceCentre/MorseWriter/tree/pynput

to do this refactor would mean dropping a lot of the pynput listener work - but not entirely - it would just be thread into the notepad

https://codeloop.org/qplaintextedit-example-in-pyqt5/

see my branch https://github.com/AceCentre/MorseWriter/tree/pynput

Its a bit easier to read.. I think.

Someone should really break this out though into some subfiles and its classes. Its Super Object oriented now..

willwade commented 6 months ago

See new #31 - got further still more to do