I noticed the mouse problem is fixed, that corresponded to when you used different input. If you used the regular keyboard, and then the keys from the mouse that emulate keyboard input (for the left and right arrow button), there would be a slight delay. The same applied for when you use a controller after using the regular keyboard or emulated keyboard from the mouse. Now, you can (if you have the hardware) use either of the three and switch between them without the screen getting stuck.

Maybe it's because the script changed. Now it's put into the background. The controller script is put into the background with &. It's a bash script.