|
@@ -1,7 +1,7 @@
|
|
|
(function () {
|
|
(function () {
|
|
|
'use strict';
|
|
'use strict';
|
|
|
|
|
|
|
|
- angular.module('ariaNg').run(['$window', '$rootScope', '$location', '$document', '$timeout', 'ariaNgCommonService', 'ariaNgNotificationService', 'ariaNgLogService', 'ariaNgSettingService', 'aria2TaskService', 'ariaNgNativeElectronService', function ($window, $rootScope, $location, $document, $timeout, ariaNgCommonService, ariaNgNotificationService, ariaNgLogService, ariaNgSettingService, aria2TaskService, ariaNgNativeElectronService) {
|
|
|
|
|
|
|
+ angular.module('ariaNg').run(['$window', '$rootScope', '$location', '$document', '$timeout', 'ariaNgCommonService', 'ariaNgKeyboardService', 'ariaNgNotificationService', 'ariaNgLogService', 'ariaNgSettingService', 'aria2TaskService', 'ariaNgNativeElectronService', function ($window, $rootScope, $location, $document, $timeout, ariaNgCommonService, ariaNgKeyboardService, ariaNgNotificationService, ariaNgLogService, ariaNgSettingService, aria2TaskService, ariaNgNativeElectronService) {
|
|
|
var autoRefreshAfterPageLoad = false;
|
|
var autoRefreshAfterPageLoad = false;
|
|
|
|
|
|
|
|
var isUrlMatchUrl2 = function (url, url2) {
|
|
var isUrlMatchUrl2 = function (url, url2) {
|
|
@@ -491,15 +491,13 @@
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var keyCode = event.keyCode || event.which || event.charCode;
|
|
|
|
|
-
|
|
|
|
|
- if ((event.code === 'KeyA' || keyCode === 65) && (event.ctrlKey || event.metaKey)) { // Ctrl+A / Command+A
|
|
|
|
|
|
|
+ if (ariaNgKeyboardService.isCtrlAPressed(event)) {
|
|
|
if (angular.isFunction($rootScope.keydownActions.selectAll)) {
|
|
if (angular.isFunction($rootScope.keydownActions.selectAll)) {
|
|
|
- $rootScope.keydownActions.selectAll();
|
|
|
|
|
|
|
+ return $rootScope.keydownActions.selectAll(event);
|
|
|
}
|
|
}
|
|
|
- } else if (event.code === 'Delete' || keyCode === 46) { // Delete
|
|
|
|
|
|
|
+ } else if (ariaNgKeyboardService.isDeletePressed(event)) {
|
|
|
if (angular.isFunction($rootScope.keydownActions.delete)) {
|
|
if (angular.isFunction($rootScope.keydownActions.delete)) {
|
|
|
- $rootScope.keydownActions.delete();
|
|
|
|
|
|
|
+ return $rootScope.keydownActions.delete(event);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}, true);
|
|
}, true);
|