[Laszlo-dev] Fwd: [dojo-contributors] new KeyRouter widget proposal
jgrandy at openlaszlo.org
Tue Aug 22 22:51:29 EDT 2006
Useful info/resources for Legals key handling?
Begin forwarded message:
> From: Douglas Hays <doughays at us.ibm.com>
> Date: August 10, 2006 6:33:47 AM PDT
> To: dojo-contributors at dojotoolkit.org
> Subject: [dojo-contributors] new KeyRouter widget proposal
> Reply-To: "dojo dev." <dojo-contributors at dojotoolkit.org>
> While adding keystroke support to the Spinner and Slider widgets,
> I noticed that there was a serious issue with keystrokes in that
> every widget has to listen for both keydown and keypress events
> and also add browser specific code. After some investigation,
> I further realized that many widgets have not correctly implemented
> the logic for particular browsers. Very few look at the event.which
> attribute for Opera and only a few call preventDefault on keyDown
> instead of keyPress for IE.
> As a solution, a created a KeyRouter utility widget. The primary
> goal of this widget is to listen for keyDown and keyPress events,
> implement browser specific code, and to present unified events
> to event handlers in the user's widgets. I mimick the RichText.js
> keyboard handler registration model so that widgets can register
> specific methods triggered by specific keys.
> I'd like to solicit comments to iron out any concerns so that
> I can get this committed into the trunk asap. I'd like to see
> this eventually moved into dojo's core, but a public beta as a
> utility widget might be appropriate.
> Doug Hays
> doughays at us.ibm.com
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Laszlo-dev