ForgeableSum Posted July 25, 2016 Share Posted July 25, 2016 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 More sharing options...
3ddy Posted July 26, 2016 Share Posted July 26, 2016 I guess it was removed from most new keyboards and is no longer supported? I dont have it on my laptop (it has numerical keys too) Link to comment Share on other sites More sharing options...
bdekk Posted July 26, 2016 Share Posted July 26, 2016 I also do not have it on my lenovo laptp. Seems redundant to implement a button that is not available on many keyboards. Link to comment Share on other sites More sharing options...
ForgeableSum Posted July 26, 2016 Author Share Posted July 26, 2016 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 More sharing options...
drhayes Posted July 26, 2016 Share Posted July 26, 2016 According to this: https://gist.github.com/lbj96347/2567917 the value you're looking for is "19". I'm on OSX so my Pause key doesn't work the same way as on Windows, but test it here: http://www.asquare.net/javascript/tests/KeyCode.html Link to comment Share on other sites More sharing options...
ForgeableSum Posted August 12, 2016 Author Share Posted August 12, 2016 I'm afraid "19", or any number for that matter, isn't in Phaser.Keyboard. Link to comment Share on other sites More sharing options...
Fatalist Posted August 12, 2016 Share Posted August 12, 2016 Usually people use Esc key for that purpose. Link to comment Share on other sites More sharing options...
Str1ngS Posted August 12, 2016 Share Posted August 12, 2016 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 More sharing options...
Recommended Posts