onKeyDownでもできるっしょ。
var keys=[];
function onKeyDown(key, shift){keys[key]=1;}
function onKeyUp(key, shift){keys[key]=0;}
とか。