SpreadJS Documentation > Sample Code > Sample Code Using the Clipboard > Deactivating Clipboard Keys |
You can deactivate Clipboard actions.
This example cancels the default cut, copy, and paste keys.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var sheet = spread.getActiveSheet(); GcSpread.Sheets.SpreadActions.none = function() { }; var key = GcSpread.Sheets.Key; //Disable CTRL+C sheet.addKeyMap(key.c, true, false, false, false, GcSpread.Sheets.SpreadActions.none); //Disable CTRL+X sheet.addKeyMap(key.x, true, false, false, false, GcSpread.Sheets.SpreadActions.none); //Disable CTRL+V sheet.addKeyMap(key.v, true, false, false, false, GcSpread.Sheets.SpreadActions.none); }); |