Package org.zkoss.zk.ui.event
Class KeyEvent
java.lang.Object
org.zkoss.zk.ui.event.Event
org.zkoss.zk.ui.event.KeyEvent
- All Implemented Interfaces:
Serializable
Represents a key pressed by the user.
- Author:
- tomyeh
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionKeyEvent(String name, Component target, int keyCode, boolean ctrlKey, boolean shiftKey, boolean altKey) KeyEvent(String name, Component target, int keyCode, boolean ctrlKey, boolean shiftKey, boolean altKey, boolean metaKey, Component ref) Constructs an event with MetaKeyKeyEvent(String name, Component target, int keyCode, boolean ctrlKey, boolean shiftKey, boolean altKey, Component ref) Constructs a mouse relevant event. -
Method Summary
Modifier and TypeMethodDescriptionfinal intReturns the key code.static final KeyEventgetKeyEvent(AuRequest request) Converts an AU request to a key event.Returns the reference item that is the component causing the key event to be fired.final booleanisAltKey()Returns whether ALT is pressed.final booleanReturns whether CTRL is pressed.final booleanReturns whether META is pressed.final booleanReturns whether SHIFT is pressed.Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
-
Field Details
-
F1
public static final int F1- See Also:
-
F2
public static final int F2- See Also:
-
F3
public static final int F3- See Also:
-
F4
public static final int F4- See Also:
-
F5
public static final int F5- See Also:
-
F6
public static final int F6- See Also:
-
F7
public static final int F7- See Also:
-
F8
public static final int F8- See Also:
-
F9
public static final int F9- See Also:
-
F10
public static final int F10- See Also:
-
F11
public static final int F11- See Also:
-
F12
public static final int F12- See Also:
-
PAGE_UP
public static final int PAGE_UP- See Also:
-
PAGE_DOWN
public static final int PAGE_DOWN- See Also:
-
END
public static final int END- See Also:
-
HOME
public static final int HOME- See Also:
-
LEFT
public static final int LEFT- See Also:
-
UP
public static final int UP- See Also:
-
RIGHT
public static final int RIGHT- See Also:
-
DOWN
public static final int DOWN- See Also:
-
INSERT
public static final int INSERT- See Also:
-
DELETE
public static final int DELETE- See Also:
-
-
Constructor Details
-
KeyEvent
-
KeyEvent
public KeyEvent(String name, Component target, int keyCode, boolean ctrlKey, boolean shiftKey, boolean altKey, Component ref) Constructs a mouse relevant event. -
KeyEvent
public KeyEvent(String name, Component target, int keyCode, boolean ctrlKey, boolean shiftKey, boolean altKey, boolean metaKey, Component ref) Constructs an event with MetaKey
-
-
Method Details
-
getKeyEvent
Converts an AU request to a key event.- Since:
- 5.0.0
-
getKeyCode
public final int getKeyCode()Returns the key code. -
isCtrlKey
public final boolean isCtrlKey()Returns whether CTRL is pressed. -
isShiftKey
public final boolean isShiftKey()Returns whether SHIFT is pressed. -
isAltKey
public final boolean isAltKey()Returns whether ALT is pressed. -
isMetaKey
public final boolean isMetaKey()Returns whether META is pressed. -
getReference
Returns the reference item that is the component causing the key event to be fired.- Since:
- 3.0.6
-