Yes maybe. You go to quite a bit of trouble to solicit and act upon a key press, that code is very involved.
I cannot test any theories at this time, but I think that the gotKey flag should be reset immediately you enter the code that handles the fact it flags
if (gotKey == true){
gotKey = false;
as the rest of that block handles the key press, so you don't want to execute it again with a stale key value.
Alternately, it is sometime done before, like
gotKey = false; // until proven otherwise
if (key){
TBH most keypad examples just use *key*, no need to compute a flag, *key* is the flag and the value all at once.
I also note the painful
if (ButtonPress[pressedKey] == "Right"){
lines which seem like they are just seeing if pressedKey is a certain number. If human readability was any part of your decision to code this, you might have used an enum, a way of assigned identifiers to numbers that is somewhat lighter weight
enum mySymbols {Stop = 1, Warn, Change, Left, Center, Right};
and anywhere in your code Warn will be the same as writing 2, Change the same as 3 and so forth.
Here's a decent article on it, your google may turn up something more to your liking:
That's it from me for now, HTH.
a7