Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Pause Break button in Phaser.Keyboard


ForgeableSum
 Share

Recommended Posts

Where is the pause/break button in Phaser.Keyboard? I'm talking about the button to the left of the num pad which literally says "Pause / Break." I know it's not on mac keyboards but should be on all windows keyboards. I'm looking for Phaser.Keyboard.Pause, or something, but it's not there. 

Link to comment
Share on other sites

I realize most laptops wouldn't have a pause button. Most laptops wouldn't have a num pad either, but that doesn't make it redundant. 

Most keyboards designed for windows have a pause / break button. And most people use windows. 

That said, I couldn't really find anything about accessing hey handlers even with plain JS/jQuery. I guess the key really is more obscure and scarcely used than I thought. 

Seems to me though, with PC gaming being what it is, it'd get more attention. I can't imagine a gaming keyboard not having one for instance.  

I don't mean to blow things out of proportion but what's wrong with the world today!?!

Link to comment
Share on other sites

  • 3 weeks later...
3 hours ago, feudalwars said:

I'm afraid "19", or any number for that matter, isn't in Phaser.Keyboard. 

That just isn't true. Apart from the alphanumeric keys, the rest are defined by using their keyCode.

Pause/Break (keyCode 19) however indeed isn't mapped. I'd suggest you submit a bug in github.

But drhayes isn't wrong, you should be able to register an event handler for keycode 19 like so:

var pauseBreakHandler = game.input.keyboard.addKey(19);
pauseBreakHandler.onDown.add(function () {
    //do something
}, this);

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...