as buran explained you need to control hotkeys on the keyboard.
Take a look at this package: https://pypi.org/project/keyboard/
github code location: https://github.com/boppreh/keyboard
specifically this part:
There are other packages, see: https://pypi.org/search/?q=keyboard
Take a look at this package: https://pypi.org/project/keyboard/
github code location: https://github.com/boppreh/keyboard
specifically this part:
Quote:Complex hotkey support (e.g. ctrl+shift+m, ctrl+space) with controllable timeout.
There are other packages, see: https://pypi.org/search/?q=keyboard