Re: How to create a global hotkey?

2006-12-08 Thread Jonathan Curran
On Thursday 07 December 2006 05:53, [EMAIL PROTECTED] wrote: > I want to make a Python app that runs in the background, and when a > user hits a key combination, for a function to run. This sounds simple > enough, but all of the keypress detecting libraries I can find count on > you creating a wind

Re: How to create a global hotkey?

2006-12-08 Thread k04jg02
Paul Boddie wrote: > [EMAIL PROTECTED] wrote: > > Sorry, I should have mentioned that I'm running Linux, and I only will > > be running this app while X is running. > > Global "hot keys" are typically the domain of the desktop environment > (or window manager for archaic desktops). Yep, that's wh

Re: How to create a global hotkey?

2006-12-08 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > Sorry, I should have mentioned that I'm running Linux, and I only will > be running this app while X is running. Global "hot keys" are typically the domain of the desktop environment (or window manager for archaic desktops). For example, KDE has a configuration dialogue

Re: How to create a global hotkey?

2006-12-08 Thread k04jg02
Sorry, I should have mentioned that I'm running Linux, and I only will be running this app while X is running. pyHook doesn't seem to be an option because it's win32 only. I'm guessing python-xlib is the way to go, but it seems to be that it relies on you understanding the C xlib library, which is

Re: How to create a global hotkey?

2006-12-07 Thread Jordan
If you're using python 2.4, you can use the pyHook library (I don't think it has been ported to 2.5 yet... I should email him about that), which can hook both the mouse and keyboard, so your program can be running in the background and still catch what keys (or mouse clicks) are pressed. The pyHoo

Re: How to create a global hotkey?

2006-12-07 Thread [EMAIL PROTECTED]
XLib would really only see the keys pressed when under X, do you want it to catch the keys directly from the keyboard? Gerold Penz wrote: > > I want my function to execute when the user presses the > > hotkey anywhere. > > Hi! > > - XLib unter Linux: http://python-xlib.sourceforge.net/ > - wxPytho

Re: How to create a global hotkey?

2006-12-07 Thread Gerold Penz
> I want my function to execute when the user presses the > hotkey anywhere. Hi! - XLib unter Linux: http://python-xlib.sourceforge.net/ - wxPython unter Windows: http://wxpython.org/docs/api/wx.Window-class.html#RegisterHotKey regards, Gerold :-) -- __

Re: How to create a global hotkey?

2006-12-07 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I want to make a Python app that runs in the background, and when a > user hits a key combination, for a function to run. This sounds simple > enough, but all of the keypress detecting libraries I can find count on > you creating a window and then detecting keypresses wh

How to create a global hotkey?

2006-12-07 Thread k04jg02
I want to make a Python app that runs in the background, and when a user hits a key combination, for a function to run. This sounds simple enough, but all of the keypress detecting libraries I can find count on you creating a window and then detecting keypresses while that window has focus. I want