mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
feat: add keyboard shortcut for editing labels
Notes: Added keyboard shortcut for editing labels.
This commit is contained in:
parent
5837603b6f
commit
ce1297b775
2 changed files with 2 additions and 1 deletions
|
@ -51,6 +51,7 @@ export class ActionManager extends EventTarget {
|
|||
},
|
||||
'show-labels-dialog': {
|
||||
enabled: false,
|
||||
shortcut: 'K',
|
||||
text: 'Edit Labels…',
|
||||
},
|
||||
'show-move-dialog': {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue