My program used to run the following bit of code and it worked perfectly when i pressed left shift. But as of today it suddenly stopped working, no code changed, no reinstalls, no updates since it was working and stopped working.
#running on windows 10
while True:
for event in pygame.event.get():
if event.type == KEYDOWN:
print(event)
if event.key == 304:#left shift
print("worked")
the output of print(event) used to be :
<Event(768-KeyDown {'unicode': '', 'key': 304, 'mod': 4096, 'scancode': 79, 'window': None})> now it is : <Event(768-KeyDown {'unicode': '', 'key': 1073742049, 'mod': 4096, 'scancode': 79, 'window': None})>
I know how to fix it, or do it in a different way, but does someone know the reason the 'key' is suddenly a ridiculous number? Is there something wrong with my computer that the key values it's giving is messed up?