📅  最后修改于: 2022-03-11 14:45:20.077000             🧑  作者: Mango
letters = {x: pygame.key.key_code(x) for x in "abcdefghijklmnopqrstuvwxyz"}
touche = pygame.key.get-pressed()
for (l, value) in letters.items() :
if touche[value] :
print(f"The letter {l} has been pressed ;)")