Found the solution, it was there:
{KEY_A:0,KEY_B:1,KEY_SELECT:2,KEY_START:3,KEY_UP:4,KEY_DOWN:5,KEY_LEFT:6,KEY_RIGHT:7},this.state1=new Array(8),a=0;a<this.state1.length;a++)this.state1[a]=64;for(this.state2=new Array(8),a=0;a<this.state2.length;a++)this.state2[a]=64},JSNES.Keyboard.prototype={setKey:function(a,b){switch(a)
{case
65:this.state1[this.keys.KEY_A]=b;break;case 89:this.state1[this.keys.KEY_B]=b;break;case 90:this.state1[this.keys.KEY_B]=b;break;case 17:this.state1[this.keys.KEY_SELECT]=b;break;case 13:this.state1[this.keys.KEY_START]=b;break;case 38:this.state1[this.keys.KEY_UP]=b;break;case 40:this.state1[this.keys.KEY_DOWN]=b;break;case 37:this.state1[this.keys.KEY_LEFT]=b;break;case 39:this.state1[this.keys.KEY_RIGHT]=b;break;case 103:this.state2[this.keys.KEY_A]=b;break;case
105:this.state2[this.keys.KEY_B]=b;break;case 99:this.state2[this.keys.KEY_SELECT]=b;break;case 97:this.state2[this.keys.KEY_START]=b;break;case 104:this.state2[this.keys.KEY_UP]=b;break;case 98:this.state2[this.keys.KEY_DOWN]=b;break;case 100:this.state2[this.keys.KEY_LEFT]=b;break;case 102:this.state2[this.keys.KEY_RIGHT]=b;break;default:return!0}return!1},keyDown:function(a){!this.setKey(a.keyCode,65)&&a.preventDefault&&a.preventDefault()},keyUp:function(a){!this.setKey(a.keyCode,64)&&a.preventDefault&&a.preventDefault()},keyPress:function(a){a.preventDefault()}},JSNES.Mappers={},JSNES.Mappers[0]=function(a){this.nes=a},JSNES.Mappers[0].prototype={reset:function()