1import keyboard
2import time
3# Using time.sleep, we can dramatically decrease the amount of CPU our program
4# uses.
5
6hotkey = "shift + ctrl + F2"
7# Remember that the order in which the hotkey is set up is the order you
8# need to press the keys.
9
10while True:
11 if keyboard.is_pressed(hotkey):
12 print("Hotkey is being pressed")
13 time.sleep(0.05)
14 time.sleep(0.01)