SpreadJS Documentation > Sample Code > Sample Code for Keyboard and Input Maps > Deactivating the Default Input Map |
You can deactivate default key actions.
This example removes the default up and down arrow key actions.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var activeSheet = spread.getActiveSheet(); //Deactivate Up key in cell move up. activeSheet.removeKeyMap(GcSpread.Sheets.Key.up, false, false, false, false); //Deactivate Down key in cell move down. activeSheet.removeKeyMap(GcSpread.Sheets.Key.down, false, false, false, false); }); |