I've spent a little while refactoring heavily the code for this. The aim really was
Ditch pyHook and win32 - pyHook is a real pain to install.
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)
Im popping this here as a reminder.
I've spent a little while refactoring heavily the code for this. The aim really was
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..