Implement keyboard shortcuts for copy/cut/paste
This commit is contained in:
@@ -371,8 +371,6 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
|
||||
e.fullFilePath = sanitize(entry.fullFilePath + '/' + e.fileName);
|
||||
});
|
||||
|
||||
console.log('=--=', result.entries)
|
||||
|
||||
var collectedFiles = [];
|
||||
async.eachLimit(result.entries, 5, function (entry, callback) {
|
||||
collectFiles(entry, function (error, result) {
|
||||
@@ -932,6 +930,21 @@ app.controller('FileManagerController', ['$scope', '$translate', '$timeout', 'Cl
|
||||
$scope.textEditor.save();
|
||||
event.preventDefault();
|
||||
}
|
||||
} else if((navigator.platform.match('Mac') ? event.metaKey : event.ctrlKey) && event.key === 'c') {
|
||||
if ($scope.view === 'textEditor') return;
|
||||
if ($scope.selected.length === 0) return;
|
||||
|
||||
$scope.actionCopy();
|
||||
} else if((navigator.platform.match('Mac') ? event.metaKey : event.ctrlKey) && event.key === 'x') {
|
||||
if ($scope.view === 'textEditor') return;
|
||||
if ($scope.selected.length === 0) return;
|
||||
|
||||
$scope.actionCut();
|
||||
} else if((navigator.platform.match('Mac') ? event.metaKey : event.ctrlKey) && event.key === 'v') {
|
||||
if ($scope.view === 'textEditor') return;
|
||||
if ($scope.clipboard.length === 0) return;
|
||||
|
||||
$scope.actionPaste();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user