import keyboard #import keyboard module if keyboard.is_pressed('ctrl') and keyboard.is_pressed('s'): func() #do something