#greenhouse monitor algorithm
import msvcrt
while not (msvcrt.kbhit() and .....): #I want to check whether the key pressed is <ESCAPE> or not
sensor1=float(input("Please input the temperature of the green house: "))
sensor2=float(input("Please input the oxygen level of the green house: "))
if (sensor1>45):
print("Warning. Temperature is too high")
if (sensor2<0.19):
print("Warning. Oxygen level is too low")
如何检查按下的键是否为ESCAPE?