# Inject-Node trigger via Hotkey?

**URL:** <https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154>\
**Category:** Feature Requests\
**Tags:** hotkey, inject\
**Created:** [3 October 2024 16:00 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154 "2024-10-03T16:00:41Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![foreversun69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/foreversun69/32/75038_2.png) [@foreversun69](https://discourse.nodered.org/u/foreversun69)\
**Post date:** [3 October 2024 16:00 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/1 "2024-10-03T16:00:41Z")

</div>

Is it possible to trigger the Inject node directly via hotkey after I have selected it?

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c7686801cbd26a1964d9ea7fe0a841de66a64278.png)

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [3 October 2024 16:12 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/2 "2024-10-03T16:12:33Z")

</div>

Welcome to forums @foreversun69

> [@foreversun69](#):
>
> Is it possible to trigger the Inject node directly via hotkey after I have selected it?

it is not - Nodes do not have a concept of attaching to keyboard events (at least not in the way you want)

to see hotkeys.

`Hamburger` menu -\> `Settings` -\> `Keyboard`

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [3 October 2024 20:42 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/3 "2024-10-03T20:42:58Z")

</div>

@marcus-j-davies This was originally posted to Redit and I suggested it was posted here so it could be discussed as a potential feature request.

My thought was to explore toggling any button on a node, e.g. both inject and debug from the keyboard if the node is selected.

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [3 October 2024 20:51 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/4 "2024-10-03T20:51:09Z")

</div>

Ah!

Didn’t see the tag!  
I’ll move it to feature requests. 👍

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [4 October 2024 07:14 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/5 "2024-10-04T07:14:08Z")

</div>

I'm not sure yet how but we can generalize it to the selection whose nodes have a button.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [22 October 2024 13:33 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/6 "2024-10-22T13:33:18Z")

</div>

> <https://github.com/node-red/node-red/pull/4924>
>
> \- \[\] Bugfix (non-breaking change which fixes an issue)
> \- \[x\] New feature (non-…breaking change which adds functionality)
> 
> \## Proposed changes
> 
> \[Forum\](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154) request.
> 
> Triggers button action for selected nodes via a Hotkey (\`ctrl-shift-t\`).
> 
> \## Checklist
> 
> \- \[x\] I have read the \[contribution guidelines\](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md)
> \- \[x\] For non-bugfix PRs, I have discussed this change on the forum/slack team.
> \- \[x\] I have run \`npm run test\` to verify the unit tests pass
> \- \[\] I have added suitable unit tests to cover the new/changed functionality

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [23 October 2024 11:25 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/7 "2024-10-23T11:25:14Z")

</div>

> [@GogoVega](#):
>
> generalize it to the selection whose nodes

My initial thought, what happens if I have two or more inject buttons? The selected one? Seems a little confusing from a UI perspective ...

Or does it stop working if there are more than one inject button on the current flow tab?

EDIT: Ah sorry so it's all selected inject nodes ... ok But would that mean I would have to select the inject node and then use the hotkey to activate the button? Won't that be the same as just clicking the inject button - if I have to select it first?

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [23 October 2024 11:36 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/8 "2024-10-23T11:36:20Z")

</div>

> [@gregorius](#):
>
> same as just clicking

I think this feature is for a _keyboard_ person! and may be injecting many nodes at _once_

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [23 October 2024 11:44 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/9 "2024-10-23T11:44:00Z")

</div>

> [@smanjunath211](#):
>
> I think this feature is for a _keyboard_ person!

True, using the arrow keys to navigate and then having a shortcut to trigger a button does make complete sense.

It shows what a difference there is between laptop with touchpad versus keyboard with mouse on desk. I don't mind using the mouse because I use the former setup.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [23 October 2024 11:48 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/10 "2024-10-23T11:48:39Z")

</div>

The primary goal is to trigger the button action of all selected nodes. In short, rather than clicking on one button then the second... we select multiple nodes and trigger the actions at once.

Then, indeed, it is a trigger with the keyboard which can please a certain audience.

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [23 October 2024 11:58 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/11 "2024-10-23T11:58:28Z")

</div>

> [@GogoVega](#):
>
> primary goal is to trigger the button action of all selected nodes

Now I could be pedantic and point out that wiring multiple injects together (or rather to those nodes they connect to) using a single inject (the so-called _uber_-inject!) would do the same thing 😉

 ![Screenshot 2024-10-23 at 13.54.05](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/e/ce94910ebcccbc79a390da2c80810cef5085ed0c.png)

Of course, the problem is that each inject has different values that they are passing into their connected nodes.

Speaking of which, I've always wished for a way to convert an inject into a change node - exactly because I've defined a bunch of variables in the inject node and now want to convert the flow to be triggered by something else (other than by my mouse). It's always a case of copying everything from the inject to the change node .... ☹

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [23 October 2024 12:23 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/12 "2024-10-23T12:23:38Z")

</div>

may be like an MS Office application, where you press ALT key to activate MENU and then press the HOTKEY to trigger the selected item?

so if an inject node is 125,

`<ALT>+125+<Spacebar> `

![shortcut_inject](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/0/b08357da794409a467d087d8bc0ee2635f01e670.gif)

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [23 October 2024 12:30 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/13 "2024-10-23T12:30:14Z")

</div>

> [@smanjunath211](#):
>
> so if an inject node is 125,

so as in your animation, `alt` would highlight the index values and then a user could type the right value and hit enter (or space).

also not a bad idea 👍

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [23 October 2024 12:35 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/14 "2024-10-23T12:35:55Z")

</div>

I also like the idea but it's another FR because it's an aid for a reduced person.

I don't know what's more useful to select a node between a number (as badge) or using the arrows (keys) to move from one node to another?

EDIT: the second already exists.

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [23 October 2024 12:43 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/15 "2024-10-23T12:43:30Z")

</div>

> [@GogoVega](#):
>
> arrows (keys) to move

+1 for the arrow keys - having an indexing of nodes would be a major restructuring of the editor code ...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 January 2025 12:44 UTC](https://discourse.nodered.org/t/inject-node-trigger-via-hotkey/92154/16 "2025-01-21T12:44:21Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
