1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

feat: add keyboard shortcut for editing labels

Notes: Added keyboard shortcut for editing labels.
This commit is contained in:
Rukario 2023-08-21 13:09:07 -07:00 committed by GitHub
parent 5837603b6f
commit ce1297b775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -51,6 +51,7 @@ export class ActionManager extends EventTarget {
},
'show-labels-dialog': {
enabled: false,
shortcut: 'K',
text: 'Edit Labels…',
},
'show-move-dialog': {

View file

@ -471,7 +471,7 @@ export class Transmission extends EventTarget {
const { ctrlKey, keyCode, metaKey, shiftKey, target } = event_;
// look for a shortcut
const is_input_focused = target.matches('input');
const is_input_focused = ['INPUT', 'TEXTAREA'].includes(target.tagName);
if (!is_input_focused) {
const shortcut = Transmission._createKeyShortcutFromKeyboardEvent(event_);
const action = this.action_manager.getActionForShortcut(shortcut);