How to fix Python stopping when it shouldnt?

  keyboard, python, python-3.9

I have a program that detects when a certain key is pressed, and it will press another key. I’m not the greatest at python, but I’ve tried everything I could to get this to work. My game will end after the hello world statement I’ve added as a test. Could somebody please tell me a way to fix this? (Note: I want the code to always stay running, waiting for user input)

https://i.stack.imgur.com/QeJ3r.png

Source: Python Questions

LEAVE A COMMENT