GC.Spread.Commands Namespace > CommandManager class : setShortcutKey Method |
true
if the command uses the Ctrl key; otherwise, false
.
true
if the command uses the Shift key; otherwise, false
.
true
if the command uses the Alt key; otherwise, false
.
true
if the command uses the Command key on the Macintosh or the Windows key on Microsoft Windows; otherwise, false
.
var instance = new GC.Spread.Commands.CommandManager(context); var value; // Type: any value = instance.setShortcutKey(commandName, key, ctrl, shift, alt, meta);
true
if the command uses the Ctrl key; otherwise, false
.true
if the command uses the Shift key; otherwise, false
.true
if the command uses the Alt key; otherwise, false
.true
if the command uses the Command key on the Macintosh or the Windows key on Microsoft Windows; otherwise, false
.var activeSheet = spread.getActiveSheet(); //Change the default Up arrow key action to "Page Up" for the active cell. spread.commandManager().setShortcutKey('navigationPageUp', GC.Spread.Commands.Key.up, false, false, false, false); //Change the default Down arrow key action to "Page Down" for the active cell. spread.commandManager().setShortcutKey('navigationPageDown', GC.Spread.Commands.Key.down, false, false, false, false);