Make another key behave exactly like Esc key?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Make another key behave exactly like Esc key?

Post by sheamkennedy »

I want the "Z" key on my keyboard to behave exactly like the Esc key. So far my "Z" key press pulls up menu 0 and also closes menu 0 if that menu is present. I feel like I'm missing something and this isn't the exact behaviour of the Esc key. Could someone point out if I'm missing something.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Esc only brings up the main menu in certain circumstances, such as when not viewing a textbox, and the player isn't suspended, and not moving, and other conditions. And it has some special behaviour if the hero is pathing. If you're riding a vehicle, it might override the menu key too.
And, Esc attempts to close the topmost menu, not just menu 0. The topmost menu may not be closable, or the player may be suspended, or more.
Last edited by TMC on Fri Nov 17, 2017 3:04 pm, edited 2 times in total.
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

Thanks that should be enough info to get it behaving the way I want.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Post Reply