mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
Add shortcut key for deleting selected torrents
Added processing of pressing 'Delete' key on keyboard.
This commit is contained in:
parent
28b976bdb8
commit
0fee2216d0
@ -352,11 +352,20 @@ window.addEvent('load', function () {
|
|||||||
|
|
||||||
function closeWindows() {
|
function closeWindows() {
|
||||||
MochaUI.closeAll();
|
MochaUI.closeAll();
|
||||||
}
|
};
|
||||||
|
|
||||||
window.addEvent('keydown', function (event) {
|
var keyboardEvents = new Keyboard({
|
||||||
if (event.key == 'a' && event.control) {
|
defaultEventType: 'keydown',
|
||||||
event.stop();
|
events: {
|
||||||
myTable.selectAll();
|
'ctrl+a': function(event) {
|
||||||
|
myTable.selectAll();
|
||||||
|
event.preventDefault();
|
||||||
|
},
|
||||||
|
'delete': function(event) {
|
||||||
|
deleteFN();
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
keyboardEvents.activate();
|
||||||
|
@ -29,6 +29,8 @@ function getLocalStorageItem(name, defaultVal) {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var deleteFN = function() {};
|
||||||
|
|
||||||
initializeWindows = function() {
|
initializeWindows = function() {
|
||||||
|
|
||||||
function addClickEvent(el, fn) {
|
function addClickEvent(el, fn) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user