Trying to show map with key press

I'm trying to show a world map by pressing "A" on the keyboard (the map would cover the screen) and by pressing "A" again it would go away, but it doesn't seem to be working. I've started a new game and tried there, too.

Here is the event:
2021-09-06 (2).png


Picture 1 is the HP HUD and I know the condition switch for this to be on because Picture 1 won't show unless it is.

Thanks in advance for the help!
Common events don't have self switches, so I don't think your condition will work.
Trihan is right, common events dont have self switches by default. Try using a game switch and it should work.
Thank you both! I will try that.

EDIT: It worked. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-show-map-with-key-press.140222/