Title says it all. Is there a way with pygame to get keyboard input when the window is minimized?
Thanks.
Title says it all. Is there a way with pygame to get keyboard input when the window is minimized?
Thanks.
Yes, although you have to have it focused.
import pygame
pygame.init()
pygame.display.iconify()
while 1:
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
print(event.key)
Otherwise it seems to not be possible according to this answer and this answer