View Full Version : quick addListener question
Bobafart
3 Feb 2007, 6:07 PM
how do you find out the list of all the keys/input devices for addListener?
I want to use the mousewheel up/down and the up/down arrows on the keyboard
thanks
Animal
3 Feb 2007, 11:36 PM
Are you imagining more peripherals than we know about?
You've mentioned the mouse and the keyboard. Go ahead and add listeners for the defined events that they fire, and then worry about new fangled peripherals!
jack.slocum
4 Feb 2007, 3:13 PM
If you have the alpha version, "mousewheel" is normalized across browsers if you use "mon()" to attach the listener. In the next release it will be normalized everywhere. To get the wheel delta, use e.getWheelDelta(), which is also normalized. :)
For key events, e.XXXX has constants defined for the keys if you use keydown for the event. You've seen the post in Dev Disc about the new KeyNav class which will do more in the next release.
BTW "e" is the normalized event object (Ext.EventObject) passed as the first argument to handlers.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.