Hi Sean,
Welcome to our community!
First of all, add Debug.Logs to your code to see if the relevant code blocks get executed as expected. ‘Not working in the game’ does not necessarily corresponds with ‘not working in the code’.
Since there is no restriction in the Update method, both methods in that code block get executed, and the if/else condition in both methods get evaluated. At least, that’s the theory. Never assume that it does work. Always check that. Otherwise, you might end up wasting a lot of time looking for the problem in the wrong place.
If other keys stop getting registered while the up arrow key is pressed down, there is a chance that you are experiencing a hardware problem. Try to press those keys on this website to see what happens:
https://drakeirving.github.io/MultiKeyDisplay/