AprendizEnLaRed Posted February 21, 2014 Share Posted February 21, 2014 I have a problem with spanish characters, by example. the key ñ the keycode is different in chrome and firefox. But i would like to know the code in phaser. I have a function for keypress game.input.keyboard.addCallbacks(this,null,this.teclaPulsada); But I saw the code in phaser but I don't know how get the keycode here :S this.tecla = game.input.keyboard; this.tecla.isDown('ñ'.charCodeAt('0')) -> is false :SThanks Link to comment Share on other sites More sharing options...
rich Posted February 22, 2014 Share Posted February 22, 2014 When your onDown callback is called it is sent 1 parameter which is the native KeyboardEvent generated by the browser. If you look at this you should see the keycode property you need (event.keyCode typically). Link to comment Share on other sites More sharing options...
AprendizEnLaRed Posted February 22, 2014 Author Share Posted February 22, 2014 Ye, is true, but I use a console.log in Keyboard -> isDown -> console.log(this._keys); for get the array with keys, and in firefox the key ñ the code is 0????? is very rare Link to comment Share on other sites More sharing options...
Recommended Posts