本帖最后由 Fiooona 于 2019-12-9 16:18 编辑
参考以下代码, 重新isReservedKey 方法,这样可以在新创建的Dom中使用功能键Control,实现复制的功能
FullNameCellType.prototype.isReservedKey = function (event, context) {
//cell type handle tab key by itself
// return (e.keyCode === GC.Spread.Commands.Key.tab && !e.ctrlKey && !e.shiftKey && !e.altKey);
const exclude = ['Backspace', 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'Shift', 'Meta', 'CapsLock', 'Escape', 'Control', 'Alt']
if (!exclude.includes(event.key)) {
return true
}
};
|