Globaler Hot Key
Verfasst: Donnerstag 14. Januar 2010, 10:12
Hallo Miteinander,
ich schreibe gerade mein erstes Pythonscript. Die Zielplattform ist Windows. Eine Ausführbare .exe möchte ich auch erstellen. Die größte Hürde ist bisher der globale Hotkey.
Über wxpython:
http://wiki.wxpython.org/RegisterHotKey
http://www.python-forum.de/topic-8648.h ... ght=hotkey
pyfltk Python wrapper für das Fast Light Tool Kit hat auch eine Globale Hotkey Funktion und wäre Plattformübergreifend verfügbar. http://pyfltk.sourceforge.net/docs/fltk ... dd_handler
ich schreibe gerade mein erstes Pythonscript. Die Zielplattform ist Windows. Eine Ausführbare .exe möchte ich auch erstellen. Die größte Hürde ist bisher der globale Hotkey.
Über wxpython:
http://wiki.wxpython.org/RegisterHotKey
http://www.python-forum.de/topic-8648.h ... ght=hotkey
pyfltk Python wrapper für das Fast Light Tool Kit hat auch eine Globale Hotkey Funktion und wäre Plattformübergreifend verfügbar. http://pyfltk.sourceforge.net/docs/fltk ... dd_handler
Ist es sinnvoll pyfltk anstatt wx einzubauen? Ist es für die Funktionsweise und Programmgröße der .exe relevant?FL_SHORTCUT If the Fl.focus() widget is zero or ignores an FL_KEYBOARD event then pyFltk tries sending this event to every widget it can, until one of them returns non-zero. FL_SHORTCUT is first sent to the Fl.belowmouse() widget, then its parents and siblings, and eventually to every widget in the window, trying to find an object that returns non-zero. pyFltk tries really hard to not to ignore any keystrokes!
You can also make "global" shortcuts by using Fl.add_handler(). A global shortcut will work no matter what windows are displayed or which one has the focus.