mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 05:27:15 +03: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
2 changed files with 16 additions and 5 deletions
|
@ -352,11 +352,20 @@ window.addEvent('load', function () {
|
|||
|
||||
function closeWindows() {
|
||||
MochaUI.closeAll();
|
||||
}
|
||||
};
|
||||
|
||||
window.addEvent('keydown', function (event) {
|
||||
if (event.key == 'a' && event.control) {
|
||||
event.stop();
|
||||
myTable.selectAll();
|
||||
var keyboardEvents = new Keyboard({
|
||||
defaultEventType: 'keydown',
|
||||
events: {
|
||||
'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;
|
||||
}
|
||||
|
||||
var deleteFN = function() {};
|
||||
|
||||
initializeWindows = function() {
|
||||
|
||||
function addClickEvent(el, fn) {
|
||||
|
|
Loading…
Reference in a new issue