Trigger button action of the selected nodes with new Hotkey

This commit is contained in:
GogoVega 2024-10-22 15:14:46 +02:00 committed by Debadutta Panda
parent f5fa05d184
commit 31fd25fc02
2 changed files with 3 additions and 2 deletions

View File

@ -91,7 +91,8 @@
"alt-shift-w": "core:show-last-hidden-flow",
"ctrl-+": "core:zoom-in",
"ctrl--": "core:zoom-out",
"ctrl-0": "core:zoom-reset"
"ctrl-0": "core:zoom-reset",
"ctrl-shift-t": "core:click-selected-nodes-button"
},
"red-ui-editor-stack": {
"ctrl-enter": "core:confirm-edit-tray",

View File

@ -3014,7 +3014,7 @@ RED.nodes = (function() {
RED.events.on('deploy', function () {
allNodes.clearState()
});
RED.actions.add("core:trigger-selected-nodes-action", function () {
RED.actions.add("core:click-selected-nodes-button", function () {
const selectedNodes = RED.view.selection().nodes || [];
// Triggers the button action of the selected nodes
selectedNodes.forEach((node) => RED.view.clickNodeButton(node));