Is there any way I can listen for keybinds while a Python program is running in the background? For example, let's say my program is running and I am in a different window. I want to listen for a Ctrl + Shift + Alt + F2
keypress, and then execute a function from that. Is that possible using Python? I am targetting Windows.
Asked
Active
Viewed 248 times
1

Fire
- 41
- 2
- 6
-
This is going to depend on which OS you are targeting. – Blorgbeard Jun 04 '19 at 18:16
-
It will also depend on the terminal you are using. Long story short it is more an environmental question than a Python one. So you have to describe exactly your environment (OS, version, terminal application) – Serge Ballesta Jun 04 '19 at 18:20
-
It'll be Windows. – Fire Jun 04 '19 at 18:20
-
https://stackoverflow.com/questions/16615087/how-to-create-a-global-hotkey-on-windows-with-3-arguments/24654577#24654577 – Blorgbeard Jun 04 '19 at 18:39