KeyDown 이벤트를 수신하려면 −
를 사용하세요.if(keyIsPressed && keycode == somenumber) { doSomething(); }
KeyDown 캡처 -
var canvas1 = layer.getCanvas()._canvas; $(canvas1).attr('tabindex', 1); canvas1.focus(); $(canvas1).keydown(function (event) { console.log(event); });