結果 : how to detect key inputs in python