This method allows you to map a keyboard key which will cause an action.
Syntax
[JavaScript]
FpSpread1.AddKeyMap(keycode,ctrl,shift,alt,action);
Parameters
- keycode
- Integer, key being pressed
- ctrl
- Boolean, Control key
- shift
- Boolean, Shift key
- alt
- Boolean, Alt key
- action
- Constant, MoveToPrevCell, MoveToNextCell, MoveToNextRow, MoveToPrevRow, MoveToFirstColumn, MoveToLastColumn, ScrollTo
Return Type
None
Remarks
This method allows you to set a JavaScript code action based on a key the user presses. The action can move to the next or previous cell or row, first or last column, or scroll to a cell.
Example
This is a sample that contains the method. On the client side, the script that contains the method would look like this:
JavaScript | Copy Code |
---|---|
<SCRIPT language=javascript> function setMap() { var ss = document.getElementById("FpSpread1"); if (ss != null){ ss.AddKeyMap(13,true,true,false,"this.MoveToLastColumn()"); } </SCRIPT> |
See Also
MoveToPrevRow | ScrollTo | Scripting Members