Create a global keyboard focus in the document level
The GWT FocusPanel class can be very unreliable, especially
when dealing with older browsers like WebKit that have to
use a hidden input trick to receive keyboard events. Its
much cleaner to install a onkeypress listener directly onto
the document object, but this is a window level listener and
it gets every key event processed, and there is only one of
them for the entire window.
This new globalkey module supports creating sets of keys and
paging them on or off as the application needs. A popup is
also available, bound to '?', showing the keyboard actions
that are currently available. The keyboard table is created
on the fly, based on the current bindings.
Signed-off-by: Shawn O. Pearce <email@example.com>
14 files changed