I am writing a macro generator / keyboard remapper in python, for xubuntu.
I figured out how to intercept and record keystrokes, and send keystrokes that I want to record, but I did not understand how to block keystrokes. I need to disable keyboard input to reassign the key. For example, if I wanted to send "a" when I press the "s" key, I can record "a" the keystroke and set it to play when I press the "s" key. I cannot, however, hold down the s key next to it.
I used the pyxhook module from open-source key-logger for interceptors and another false input method from the python x library.
I remember reading somewhere that someone was blocking all keyboard input, redirecting all keystrokes to an invisible window using tkinter. If someone can post this method, that would be great.
I need something that will block all keystrokes, but not turn off my keyboard hooks.
user118306
source
share