|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KeyboardEvents
Page.registerKey(java.lang.String, com.smartgwt.client.util.KeyCallback)
or com.smartgwt.client.util.Page#setEvent
or at the widget level via Canvas.addKeyDownHandler(com.smartgwt.client.widgets.events.KeyDownHandler)
, Canvas.addKeyPressHandler(com.smartgwt.client.widgets.events.KeyPressHandler)
,
and Canvas.keyUp()
. Details about the key events can be retrieved via static
methods on the EventHandler class including EventHandler.getKey()
, EventHandler.getKeyEventCharacter()
and EventHandler.getKeyEventCharacterValue()
.
As with other Smart GWT event handling code,
returning false
will suppress the default native browser behavior.
Note: browsers do not allow
cancellation of some keys' default behaviors. These cases vary by browser, and wherever native cancellation is
supported, returning false from your event handler should be sufficient to suppress the behavior.
Some specific
cases where default behavior cancellation is not always possible include:
f1, f3,
f5,
etc) which trigger native browser behavior. [These can be suppressed in Internet Explorer and Mozilla
Firefox but not in some other browsers such as Safari / Chrome, etc]Alt+f3
Windows
/ Apple
key to show OS
level menu)
EventHandler.getKeyEventCharacterValue()
,
EventHandler.getKeyEventCharacter()
,
EventHandler.getKey()
,
EventHandler.shiftKeyDown()
,
EventHandler.ctrlKeyDown()
,
EventHandler.altKeyDown()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |