[]
You can change the active cell or selected cells with the mouse or keyboard keys. You can also use keyboard keys to make changes to the cell data.
The end-user can use the following default, keyboard keys:
KEY | ACTION |
|---|---|
Ctrl+Z |
|
Ctrl+Y |
|
Ctrl + Down |
|
Down |
|
End |
|
Ctrl+Right |
|
Ctrl+Home |
|
Home |
|
Ctrl+Left |
|
Ctrl+End |
|
Left |
|
Tab |
|
PageDown |
|
PageUp |
|
Ctrl+PageUp |
|
Ctrl+PageDown |
|
Shift+Tab |
|
Right |
|
Ctrl+Up |
|
Up |
|
Delete |
|
Back |
|
Enter |
|
Shift+Enter |
|
ESC |
|
Shift+Left |
|
Shift+Right |
|
Shift+Up |
|
Shift+Down |
|
Shift+Home |
|
Ctrl+Shift+Left |
|
Shift+End |
|
Ctrl+Shift+Right |
|
Shift+PageUp |
|
Shift+PageDown |
|
Ctrl+Shift+Up |
|
Ctrl+Shift+Down |
|
Ctrl+Shift+Home |
|
Ctrl+Shift+End |
|
Ctrl+C |
|
Ctrl+X |
|
Ctrl+V |
|
Alt+Enter |
|
Note: The Ctrl+PageUp and Ctrl+PageDown keyboard shortcuts only work when there is no conflict with the host environment.
Additional information about copy and paste actions using keyboard shortcuts:
SpreadJS does not have direct access to the system clipboard.
When using Ctrl+C to copy in SpreadJS, it will perform both outside copy and internal copy.
When using Ctrl+V to paste in SpreadJS, it will decide whether to do outside paste or internal paste.
When using the context menu or the command manager, SpreadJS always does an internal copy and internal paste because it cannot access the system clipboard.
By default, the Enter key is bound to the commitInputNavigationDown command, which:
Commits the edited value
Moves the active cell down
Starting from SpreadJS v19.2, a built-in command named commitInput is available.
The commitInput command:
Commits the edited value
Ends edit mode
Keeps the active cell in place
Has no default shortcut binding
If you want the Enter key to commit the value but not move the active cell, follow these steps:
Step 1: Remove the default Enter behavior
var commandManager = spread.commandManager();
commandManager.setShortcutKey(
null,
GC.Spread.Commands.Key.enter,
false, false, false, false
);Step 2: Bind Enter to commitInput
commandManager.setShortcutKey(
"commitInput",
GC.Spread.Commands.Key.enter,
false, false, false, false
);When editing a cell → Value is committed and the active cell stays in place.
When not editing → Enter does nothing.
If you want:
Editing → Commit only
Not editing → Move down
You can bind both commitInput and a reused navigationDown command.
var commandManager = spread.commandManager();
// Remove default Enter behavior
commandManager.setShortcutKey(
null,
GC.Spread.Commands.Key.enter,
false, false, false, false
);
// Register navigationDown with a new name
commandManager.register(
"navigationDownForEnter",
GC.Spread.Sheets.Commands.navigationDown
);
// Bind navigationDownForEnter first
commandManager.setShortcutKey(
"navigationDownForEnter",
GC.Spread.Commands.Key.enter,
false, false, false, false
);
// Bind commitInput
commandManager.setShortcutKey(
"commitInput",
GC.Spread.Commands.Key.enter,
false, false, false, false
);State | Behavior |
|---|---|
Editing | Commit value and stay in the same cell |
Not Editing | Move active cell down |
You can also execute the command programmatically:
spread.commandManager().execute({
cmd: "commitInput",
sheetName: spread.getActiveSheet().name()
});SpreadJS supports some additional keyboard shortcut commands. These shortcuts can be included in your project as an extension by downloading and using the Keyboard Shortcuts project available here. You can also add custom shortcuts based on this project.
KEY | ACTION |
|---|---|
Shift + Space |
|
Ctrl + Space |
|
Ctrl + "-" |
|
Ctrl + 9 |
|
Ctrl + [ |
|
Ctrl + ] |
|
Ctrl + ; |
|
Alt + = |
|
Alt + Shift + Right Arrow |
|
Alt + Shift + Left Arrow |
|
Alt + ; |
|
Ctrl + D |
|
Ctrl + R |
|
Ctrl + Shift + "+" |
|
Ctrl + A |
|
Ctrl + B |
|
Ctrl + I |
|
Ctrl + U |
|
Ctrl + Shift + % |
|
Ctrl + Arrow |
|
Ctrl + Shift + Arrow |
|
Ctrl + Shift + + |
|
Ctrl + - |
|
Notes:
The shortcut library is integrated into the Designer library and is included in the Designer library build output, so users won't need to link shortcut library files separately.
Ctrl + Arrow and Ctrl + Shift + Arrow do not support redo and undo actions.
These shortcuts do not support MAC OS.
These shortcuts do not support TableSheet and GanttSheet.