I hereby claim:
- I am manfredovaldes on github.
- I am manfredovaldes (https://keybase.io/manfredovaldes) on keybase.
- I have a public key ASB1Bm7P7s3dpOtfmcWAt91uu1DMMx3mYRRt9-4NVozu3Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
var keys = {13:'Start',16:'Select', 37: 'Left',38:'Up',39:'Right',40:'Down',65:'a',66:'b'}; | |
var cmdCount = 0; | |
$(document).unbind("keydown").keydown(function(evt){ | |
if($("#chat_text_input").is(":focus")) return; | |
var key = keys[evt.keyCode]; | |
if (typeof key === 'undefined') return; | |
if (cmdCount % 3 === 1) key = key.toUpperCase(); | |
else if (cmdCount % 3 === 2) key = key.toLowerCase(); | |
cmdCount ++; | |
$("#chat_text_input").val(key); |