I want to create application with taskbar/system-tray icon. Crossplatform. OSX, Windows, Linux (Ubuntu/Centos/Mint/Manjaro and other popular distros).
This app should detect keyboard input and react to it. Basically do some actions on specific keys. Example: user wants to play some music, presses shift+ctrl+p. Music starts playing.
I know that Kivy capable of detecting
3
Answers
For the "cross-platform system-tray" thingy - I don't think this is entirely possible without some truly cross-platform framework like Elektron or something, which can give ability to use system-tray/taskbar feature.
For the detecting mouse even when window is not focused - use pynput with asyncio (example for kivy + asyncio in their official repository). Basically: you can detect keyboard events even when app is not focused with background working code with asyncio. Then it will detect every keystroke.
If you’re willing to depart from Kivy and use another framework, PySimpleGUI has a System Tray capability (at least for Windows, and perhaps Linux/Mac) when running the tkinter version. The PySimpleGUIQt port has a more "official" System Tray feature.
The GitHub Repo PySimpleHotkey is one example of how to use the psgtray package to make a hotkey program.
https://github.com/PySimpleGUI/PySimpleHotkey