为什么我的pygame检测不到键盘按下
python3吧
全部回复
仅看楼主
level 1
import pygame
pygame.init()
while True:
for event in pygame.event.get():
if event.type == pygame.K_SPACE:
print('action')
以上是我的代码,按下空格发送一段文字,为什么没有反应
2021年11月13日 06点11分 1
level 1
if event.type==pygame.KEYDOWN:
if event.key==pygame.K_SPACE:
print('action')
2021年11月25日 01点11分 2
1