Capturing global input?

nomihn0 nomihn0 at gmail.com
Sun Dec 9 19:44:00 EST 2007


Thanks to all, you were very helpful.  I suppose I'll use Jython after
all.

On Dec 6, 10:17 pm, MonkeeSage <MonkeeS... at gmail.com> wrote:
> On Dec 6, 9:16 pm, MonkeeSage <MonkeeS... at gmail.com> wrote:
>
>
>
> > On Dec 6, 3:51 pm, nomihn0 <nomi... at gmail.com> wrote:
>
> > > I'd like to accept mouse gestures and keyboard shortcuts as input to a
> > > program. The nature of this program requires that these commands be
> > > issued regardless of the currently active window. Here's the rub: I
> > > need a platform-independent solution.
>
> > > Java supports with its MouseInfo class, but I'd like a Python
> > > equivalent without turning to Jython.  Is this possible?
>
> > > Thanks in advance.
>
> > There is no cross-platform way to do that. You have to use whatever
> > interface the OS provides for that (e.g., Xlib events for X11). You
> > could probably write a platform independent way by testing the OS and
> > using the appropriate apis for that OS (assuming that there are python
> > modules like python-xlib for other OS). I wonder why you'd want to
> > though, if Java already provides a solution? If you don't want to muck
> > with Java syntax, what about Jython?
>
> > Regards,
> > Jordan
>
> Ps. I saw you said you didn't want Jython, but I can't see why.



More information about the Python-list mailing list