Saturday, May 4, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 4602  / 1 Year ago, wed, february 8, 2023, 9:20:34

I'm looking to create a global hotkey in Python 3.2 for Ubuntu 12.10. That is, my script will run in the background and whenever I press Shift+F4 (for example), no matter what the active window is, the script will do something.



Some resources I have looked at:





Maybe I am too much of a newb (I am a beginner) or I have been looking in the wrong places or for the wrong things, but, I haven't been able to utilize the resources above.



How can I create a global hotkey with Python 3.2 in Ubuntu 12.10. Thanks!


More From » shortcut-keys

 Answers
0

You can do this at X11/Xlib level. See this question for how to handle global hotkeys correctly in C: Global Hotkey with X11/Xlib



Now you only need some Python Xlib library; python-xlib looks like a reasonable choice.


[#33670] Wednesday, February 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
uestred

Total Points: 464
Total Questions: 104
Total Answers: 112

Location: Israel
Member since Wed, Apr 14, 2021
3 Years ago
;