PDA

View Full Version : enable "left" and "right" buttons events



ahsec
4 Jul 2012, 7:50 AM
Hey everyone

I have a window component
that when rendered I bind it to keypress event as follows


abstractcomponent.getEl().addListener( 'keypress',
function( e, t, eOpts ){
if (e.keyCode == 37) {
prevAtt();
}
if (e.keyCode == 39) {
nexAtt();
}
}
);

however .. it works for all key events except for the arrows...it probably has to be overridden by browser...

any ideas anyone??

thanks

skirtle
4 Jul 2012, 1:12 PM
Have you tried using the keydown or keyup events instead?