結果 : check if a key is pressed python