mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-14 05:20:31 +00:00
Add new shortcuts to shortcuts dialog (#26836)
This commit is contained in:
@@ -88,7 +88,10 @@ export class HaAutomationRow extends LitElement {
|
|||||||
(ev.ctrlKey || ev.metaKey) &&
|
(ev.ctrlKey || ev.metaKey) &&
|
||||||
!ev.shiftKey &&
|
!ev.shiftKey &&
|
||||||
!ev.altKey &&
|
!ev.altKey &&
|
||||||
(ev.key === "c" || ev.key === "x" || ev.key === "Delete")
|
(ev.key === "c" ||
|
||||||
|
ev.key === "x" ||
|
||||||
|
ev.key === "Delete" ||
|
||||||
|
ev.key === "Backspace")
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
@@ -119,7 +122,7 @@ export class HaAutomationRow extends LitElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ev.key === "Delete") {
|
if (ev.key === "Delete" || ev.key === "Backspace") {
|
||||||
fireEvent(this, "delete-row");
|
fireEvent(this, "delete-row");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,21 @@ const _SHORTCUTS: Section[] = [
|
|||||||
{
|
{
|
||||||
key: "ui.dialogs.shortcuts.automation_script.title",
|
key: "ui.dialogs.shortcuts.automation_script.title",
|
||||||
items: [
|
items: [
|
||||||
|
{
|
||||||
|
type: "shortcut",
|
||||||
|
shortcut: [{ key: "ui.dialogs.shortcuts.shortcuts.ctrl_cmd" }, "C"],
|
||||||
|
key: "ui.dialogs.shortcuts.automation_script.copy",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "shortcut",
|
||||||
|
shortcut: [{ key: "ui.dialogs.shortcuts.shortcuts.ctrl_cmd" }, "X"],
|
||||||
|
key: "ui.dialogs.shortcuts.automation_script.cut",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "shortcut",
|
||||||
|
shortcut: [{ key: "ui.dialogs.shortcuts.shortcuts.ctrl_cmd" }, "del"],
|
||||||
|
key: "ui.dialogs.shortcuts.automation_script.delete",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: "shortcut",
|
type: "shortcut",
|
||||||
shortcut: [{ key: "ui.dialogs.shortcuts.shortcuts.ctrl_cmd" }, "V"],
|
shortcut: [{ key: "ui.dialogs.shortcuts.shortcuts.ctrl_cmd" }, "V"],
|
||||||
|
|||||||
@@ -2061,6 +2061,9 @@
|
|||||||
},
|
},
|
||||||
"automation_script": {
|
"automation_script": {
|
||||||
"title": "Automations / Scripts",
|
"title": "Automations / Scripts",
|
||||||
|
"copy": "to copy the selected automation/script action/condition/trigger",
|
||||||
|
"cut": "to cut the selected automation/script action/condition/trigger",
|
||||||
|
"delete": "to delete the selected automation/script action/condition/trigger",
|
||||||
"paste": "to paste automation/script YAML from clipboard to editor",
|
"paste": "to paste automation/script YAML from clipboard to editor",
|
||||||
"save": "to save automation/script"
|
"save": "to save automation/script"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user