Esc key problems

Get help using Construct 2

Post » Tue Jul 12, 2016 10:03 pm

Guys, I'm having a problem with C2 that's got me stumped. All I want to do is have it so that when a player presses Esc, they are taken back to the game's title screen; but nothing I do works. If I change the particular key to anything else the code works just fine - C2 seems to just not want to recognise Esc key presses. Thinking I must've messed something up in my code elsewhere, I made a new C2 project and tested, and I still can't get the Esc key to work or do anything. So I thought, maybe my Esc key is just broken? Nope, I can esc out of Youtube videos just fine.

Weird thing is I did a forum search and I can't find any other reference to this problem. Am I going insane? Am I missing something? C2 simply does not want to register Esc keypresses. (I've tried doing it via the relevant keycode, before anyone asks. Still no dice).

Anybody able to help? :(
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 201
Reputation: 3,460

Post » Tue Jul 12, 2016 10:15 pm

Hi mikehive,

if you can post your capx I can take a look at it. With which browser are you testing it? Also, pressing ESC in YTs fullscreen mode is handled different than in "not fullscreen" things. Maybe try setting your preview browser on NW.js, just to debug the ESC-button.

Regards
Proxy
B
24
S
14
G
9
Posts: 118
Reputation: 6,794

Post » Tue Jul 12, 2016 10:40 pm

Thanks for replying :) I can't post my capx because it's my "big game" with years of work in it, but it doesn't matter - as I said earlier, it's not project-specific. I already preview in nw.js :(
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 201
Reputation: 3,460

Post » Tue Jul 12, 2016 10:44 pm

Here's a very simple capx. When you press Esc, the square should turn red. It doesn't work for me, but it does if I change the event to any other key press. Tested in nw.js, Chrome, and Firefox. http://mikelaraman.com/misc/esc.capx
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 201
Reputation: 3,460

Post » Wed Jul 13, 2016 5:24 am

It works for me. NW.js preview.

Unfortunately I don't have any ideas what may be wrong with yours.

Try another keyboard? Close all background apps?
Mistakes were made.
B
49
S
24
G
107
Posts: 1,581
Reputation: 60,303

Post » Wed Jul 13, 2016 6:19 am

mikehive wrote:Here's a very simple capx. When you press Esc, the square should turn red. It doesn't work for me, but it does if I change the event to any other key press. Tested in nw.js, Chrome, and Firefox. http://mikelaraman.com/misc/esc.capx


Hi mikehive,

I'll check it as soon as Im back home again ;) !

Cheers
Proxy
B
24
S
14
G
9
Posts: 118
Reputation: 6,794

Post » Wed Jul 13, 2016 7:13 am

oosyrag wrote:Close all background apps?


Ah! That did it. Turns out Esc doesn't work if Photoshop is open at the same time?? Apparently this is a known issue with Photoshop: http://www.howtogeek.com/howto/20226/ho ... n-windows/

Problem solved! Thanks guys :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 201
Reputation: 3,460


Return to How do I....?

Who is online

Users browsing this forum: Rudi55 and 12 guests