Package org.zkoss.zats.mimic.operation
Interface KeyStrokeAgent
- All Superinterfaces:
Agent,OperationAgent
This agent mimics keystroke operation to a component that extends from HtmlBasedComponent.
Most of ZK components extend HtmlBasedComponent.
Related events are onOK, onCancel and onCtrlKey.
- Author:
- dennis
-
Method Summary
Methods inherited from interface org.zkoss.zats.mimic.Agent
getClient, getDelegatee
-
Method Details
-
stroke
Following keys triggers onOK and onCancel- #enter
- The ENTER key, it post a onOK event
- #esc
- The ESC key, it post a onCancel event
- ^k
- A control key, i.e., Ctrl+k, where k could be a~z, 0~9, #n
- @k
- A alt key, i.e., Alt+k, where k could be a~z, 0~9, #n
- $n
- A shift key, i.e., Shift+n, where n could be #n. Note: $a ~ $z are not supported.
- #home
- Home
- #end
- End
- #ins
- Insert
- #del
- Delete
- #bak
- Backspace
- #left
- Left arrow
- #right
- Right arrow
- #up
- Up arrow
- #down
- Down arrow
- #pgup
- PageUp
- #pgdn
- PageDn
- #f1 #f2 ... #f12
- Function keys representing F1, F2, ... F12
Following keys trigger onCtrlKey event:
For example,
- ^#left
- It means Ctrl+Left.
- ^#f1
- It means Ctrl+F1.
- @#f3
- It means Alt+F3.
Note: it doesn't support Ctrl+Alt, Shift+Ctrl, Shift+Alt or Shift+Ctrl+Alt.
- Parameters:
key- keystroke string
-