mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-13 13:00:24 +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.shiftKey &&
|
||||
!ev.altKey &&
|
||||
(ev.key === "c" || ev.key === "x" || ev.key === "Delete")
|
||||
(ev.key === "c" ||
|
||||
ev.key === "x" ||
|
||||
ev.key === "Delete" ||
|
||||
ev.key === "Backspace")
|
||||
)
|
||||
) {
|
||||
return;
|
||||
@@ -119,7 +122,7 @@ export class HaAutomationRow extends LitElement {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ev.key === "Delete") {
|
||||
if (ev.key === "Delete" || ev.key === "Backspace") {
|
||||
fireEvent(this, "delete-row");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,21 @@ const _SHORTCUTS: Section[] = [
|
||||
{
|
||||
key: "ui.dialogs.shortcuts.automation_script.title",
|
||||
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",
|
||||
shortcut: [{ key: "ui.dialogs.shortcuts.shortcuts.ctrl_cmd" }, "V"],
|
||||
|
||||
@@ -2061,6 +2061,9 @@
|
||||
},
|
||||
"automation_script": {
|
||||
"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",
|
||||
"save": "to save automation/script"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user