Sometimes at night, I like to watch movies in bed, or TV shows online. This is convenient since my computer is right beside my desk, so I just spin one of my monitors around, disable my other screen and pull my mouse over. My keyboard doesn't quite reach without re-routing the cable in a way that doesn't work when I move back to my desk the next day. Sometimes while I'm watching movies, my friends try to talk to me, and I would like to be able to talk back without jumping up, spinning the monitor around, moving the mouse back and sitting in the chair again.
What I would like to do is make an on-screen keyboard to be used with the mouse -- but in a T9 phone-keypad style to (hopefully) minimize the number of clicks and amount of moving the mouse around, missing targets. I'd like to do this in Python since I'm already familiar with the language, but I'm not sure where to start.
One thing I'm not sure of, is how to click the on-screen keyboard without stealing focus from the chat window. Can this be accomplished? Or can the application remember the last focused control in the last focused window and send keystrokes to it?
Also, would I need an external library to do any of this window management and keystroke sending?
Help is greatly appreciated, and if such a thing already exists (in any language), pointing me towards it would also be greatly appreciated.
I'll definitely open source it and post a link to the project here if and when I develop it, incase anyone else would find this sort of thing useful :)