# Emulate Keyboard

**URL:** https://discourse.nodered.org/t/emulate-keyboard/97167
**Category:** General
**Created:** [20 May 2025 23:12 UTC](https://discourse.nodered.org/t/emulate-keyboard/97167 "2025-05-20T23:12:04Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jauntddd](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jauntddd](https://discourse.nodered.org/u/jauntddd)
#### Post date: [20 May 2025 23:12 UTC](https://discourse.nodered.org/t/emulate-keyboard/97167/1 "2025-05-20T23:12:04Z")

</div>

I want to use a node to emulate keystrokes to type on a windows host remotely. I can send a payload with the text I want to type, but I haven't had any luck finding a node that works which can type out this payload.

I've tried nbr-keyb-mouse, node-red-contrib-sendkeys and looked at a few more and none of them seem to work.

Has anyone else been successful at doing this? Is there some other program I can interact with using node-red to emulate a keyboard?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [21 May 2025 06:35 UTC](https://discourse.nodered.org/t/emulate-keyboard/97167/2 "2025-05-21T06:35:58Z")

</div>

Hi welcome to the forum.

I can't help with sending key strokes but maybe if you say what you are trying to achieve (the end goal) we could suggest an alternative solution?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [21 May 2025 12:28 UTC](https://discourse.nodered.org/t/emulate-keyboard/97167/3 "2025-05-21T12:28:30Z")

</div>

You could always call out to PowerShell. But I've had better luck with using AutoHotKey.

I have a [FlexBar](https://eniacelec.com) and use that with AHK to make Windows interactions easier. I also use AHK to define some global hotkeys.

Alternatively, there are various node.js packages that you could use with a function node.

For example: [GitHub - Krombik/keysender: Node.js Desktop Automation for Windows.](https://github.com/Krombik/keysender)

---

<div class="post-metadata">

### Author: ![jauntddd](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jauntddd](https://discourse.nodered.org/u/jauntddd)
#### Post date: [21 May 2025 22:22 UTC](https://discourse.nodered.org/t/emulate-keyboard/97167/4 "2025-05-21T22:22:48Z")

</div>

I want to be able to respond to in-game messages. There's not way to interact in this game except through keyboard / mouse gestures so there's no API to communicating in-game.

Currently I am using a node to cat the log file, which shows me the message I receive.

However, I cannot reply without using the keyboard or some keyboard emulator.

edit:

I am receiving these messages via node-red to home assistant. And I can also send a payload with my message back, also using home assistant. But no way to interact with the game. Either way, I am not against using some other solution, but I do need to be able to do it from my android phone.

---

<div class="post-metadata">

### Author: ![jauntddd](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jauntddd](https://discourse.nodered.org/u/jauntddd)
#### Post date: [21 May 2025 22:27 UTC](https://discourse.nodered.org/t/emulate-keyboard/97167/5 "2025-05-21T22:27:56Z")

</div>

Also to make it clear, I am not a programmer and am not really good at this. I can use node-red because I find it easier to program with, so ideally it would have a GUI front end.

II checked out keysendder node.js and it's not easy to me to see how I can use it from my android device to send a message. I'm afraid I'm not that technical.

Perhaps I can integrate with autohotkey from my android device? I'll do a bit of googling for that.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [21 May 2025 23:21 UTC](https://discourse.nodered.org/t/emulate-keyboard/97167/6 "2025-05-21T23:21:42Z")

</div>

> [@jauntddd](#):
>
> Perhaps I can integrate with autohotkey from my android device?

Hmm, you aren't making it easy for yourself I'm afraid. Check out Tasker for Android. AHK is about as easy as these things get I'm afraid.

Not had time to check any of this but in case it helps:

> **[Brave Search](https://search.brave.com/search?q=tasker%2Bautohokey)**
>
> Search the Web. Privately. Truly useful results, AI-powered answers, & more. All from an independent index. No profiling, no bias, no Big Tech.

---

<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: [19 August 2025 23:21 UTC](https://discourse.nodered.org/t/emulate-keyboard/97167/7 "2025-08-19T23:21:46Z")

</div>

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