nut.js
nut.js copied to clipboard
Add support for typing emojis
Short overview
Add support for typing emojis:
keyboard.type('Hello World 👋')
I'm building a Electron app that needs to inject text and emojis into any text field. Injecting normal text works great with nut.js
, but emojis are not working.
Let me know if there's something I can do/help with.
Hi @BetaHuhn 👋
I assume you’re on either Windows or Linux? Unicode is at the moment only supported on macOS.
I already started a PR for Unicode support on Windows and Linux as well, I’m just hesitant to merge it since the Linux implementation is not finished yet.
Hey, yes I'm on Windows.
Ah great! Do you have a rough timeframe when the Linux implementation is finished/when you want to merge it? Let me know if I can help with the implementation or testing!
@BetaHuhn I‘m working on v2.0, aiming for a release in October
Okay great!
Is the Windows implementation available somewhere for me to try out before the release?
Is the Windows implementation available somewhere for me to try out before the release?
No, there's no snapshot of it yet
I'm guessing this is also adds support for å ä ö ? Is there a branch for this feature?
Unicode keyboard emulation on Windows would be wonderful, indeed!
I just had the chance to test the current behavior on macOS:

It looks like German-Umlaute do work, but emojis do not work. 🥲
See the code here. I believe the index.js
file is encoded in UTF-8, if this matters.
Any update on this? The missing support for typing Unicode, especially German Umlaute on Windows, is blocking me from switching from Robot.js to nut.js. Apparently, Robot.js implements typing Unicode in recent versions and it works for me both under Windows x64 and macOS ARM. They seem to have not yet documented this feature, though. Nevertheless, I appreciate the benefits of nut.js and would gladly switch over!
This issue is stale because it has been open for 30 days with no activity.
Still active
This issue is stale because it has been open for 30 days with no activity.
Still active, I'm just busy, dear bot :)
This issue is stale because it has been open for 30 days with no activity.
I’ll disable this automation again…
Status update: Implemented unicode keyboard support for macOS. WIP.
Window version is working as well.
A first version is now available via @next
npm i @nut-tree/nut-js@next
Please give it a try and report any errors!
Works for me in my demo project on MacOS 12.2.1!
I am looking forward to try it on my Windows machine.
PS: Seems to work on Windows as well. Nice.