0 Favourites

Esc key problems

  • 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?

  • 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

  • Thanks for replying

  • 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.

  • 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?

  • 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.

    Hi mikehive,

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

    Cheers

    Proxy

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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:

    Problem solved! Thanks guys

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)