suppose there is this code
import time
function():
print("abcd")
time.sleep(1)
print("efgh")
function()
I want the function()
to run whenever I press a combination of keys from anywhere on the pc. Like, suppose I am on chrome watching a youtube video, and I press suppose shift+alt+b then the function()
should start running and print those things.
I am on windows 10 working on python 3.8 I guess.