tags:

views:

660

answers:

1

Hello! I need to make a global hotkey for my application, and it should work under X11 and Windows. Programming language: Python. Thanks.

+2  A: 

What GUI toolkit are you using? Generally, global hot keys are handled by the Desktop environment or Window Manager - I dont believe that Python's builtin toolkit (tkinter) can make global hotkeys. You might look at xlib for Unix and a win lib for windows.

Shane C. Mason
I use Qt (PyQt).So, for different OS i should use different libraries?
Ockonal
I think so. As an alternative, you might check out QXT (addon for qt) which has this cross platform global shortcut class http://docs.libqxt.org/0.4.0/classQxtGlobalShortcut.html
Shane C. Mason