Closed crypdick closed 5 years ago
If you look at the source, the main code creating and updating the main label is in Screenkey/screenkey.py. You don't need labelmanager and inputlistener entirely. You could remove both and instead read text directly from a socket or a pipe and call Screenkey.on_label_change with the text that you want to display.
It's not that hard, but mind you: screenkey was not really designed for random text display. I remember using several general "OSD" daemons that could do something similar.
I've started a fork (at https://github.com/crypdick/silvius-screenkey) to integrate screenkey into the Silvius project (https://github.com/dwks/silvius/issues/24). Silvius lets people with disabilities control Linux by using voice recognition to generate keystrokes.
As you speak, the audio is translated into text, and the predicted text is updated as it gets more context. When it detects you've finished speaking, it parses the text and it waits for you to speak again.
I'd like to send the new string to screenkey everytime the prediction gets updated, and stop displaying it once it goes to get parsed. How can I make screenkey ignore keystrokes and instead display arbitrary text?
Thanks!