Python – use Python to intercept global keystrokes in KDE


I want to make a simple app, ideally in Python, that would run in the background on KDE, listening to all keystrokes being done by the user, so that the app goes to the foreground if a specific combination of keys is pressed. Is that doable? Can anyone point me to such resource?

Best Solution

A quick google found this:

You might be able to use some of the source code.