Esc key problems

0 favourites
  • 7 posts
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • 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

  • Try Construct 3

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

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

  • 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. http://mikelaraman.com/misc/esc.capx

    Hi mikehive,

    I'll check it as soon as Im back home again <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> !

    Cheers

    Proxy

  • 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 <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

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