Why won't this code work? (Key Input Processing) [Solved]

@> Control Variables: [0262: Object 1 X] = This Event's X Coordinate
@> Control Variables: [0263: Object 1 Y] = This Event's Y Coordinate
@> Conditional Branch: Variable [0001: Controls] == 4
@> Conditional Branch: Variable [0263: Object 1 Y] == Variable [0062: Player Front Y]
@> Conditional Branch: Variable [0262: Object 1 X] == Variable [0061: Player Front X]
@> Game Over
@>
: Branch End
@>
: Branch End
@>
: Branch End

Been stuck on this for a while. The gameover is just for testing purposes. I have a common event that commands all the inputs, works fine for everything except this. And yes, the Player Front X and Y variables are properly matching the Object 1 X and Y variables.
Probably the problem is the "this event"(which probably refers to the common event itself, and not to the event on the map), try using the event id for the coordinates.
Oh, this code is on the map event. My common events only tracks the player.

It's weird because this kind of code works with other buttons, except the arrow keys.
Oh!
The arrow keys turns 0 when you release the key, and if you don't release it, the character still walking and change the coordinates.
Why you use it in the control for the coordinates?
Oh!
The arrow keys turns 0 when you release the key, and if you don't release it, the character still walking and change the coordinates.
Why you use it in the control for the coordinates?

It's not in the key input variable, it's just in the same event. Sorry I couldn't explain properly.

But anyways, I finally figured out the problem. The event with the Key Input Processing was in a loop, and apparently when events are looped they run a lot faster. So I guess the engine couldn't register the key press in time?

I'm not sure what's the deal, RPG Maker is full of these little quirks and it's kinda annoying sometimes... but it's fixed now. Thank you.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/why-wont-this-code-work-key-input-processing-solved.117805/