nut.js icon indicating copy to clipboard operation
nut.js copied to clipboard

Add support for typing emojis

Open BetaHuhn opened this issue 2 years ago • 16 comments

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.

BetaHuhn avatar Sep 23 '21 15:09 BetaHuhn

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.

s1hofmann avatar Sep 24 '21 15:09 s1hofmann

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 avatar Sep 24 '21 16:09 BetaHuhn

@BetaHuhn I‘m working on v2.0, aiming for a release in October

s1hofmann avatar Sep 25 '21 18:09 s1hofmann

Okay great!

Is the Windows implementation available somewhere for me to try out before the release?

BetaHuhn avatar Sep 25 '21 21:09 BetaHuhn

Is the Windows implementation available somewhere for me to try out before the release?

No, there's no snapshot of it yet

s1hofmann avatar Sep 28 '21 09:09 s1hofmann

I'm guessing this is also adds support for å ä ö ? Is there a branch for this feature?

Megamannen avatar Jan 05 '22 09:01 Megamannen

Unicode keyboard emulation on Windows would be wonderful, indeed!

raphaelmenges avatar Jan 28 '22 15:01 raphaelmenges

I just had the chance to test the current behavior on macOS:

Screenshot 2022-01-28 at 21 40 49

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.

raphaelmenges avatar Jan 28 '22 20:01 raphaelmenges

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!

raphaelmenges avatar Mar 28 '22 08:03 raphaelmenges

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar May 18 '22 02:05 github-actions[bot]

Still active

s1hofmann avatar May 18 '22 05:05 s1hofmann

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 19 '22 02:06 github-actions[bot]

Still active, I'm just busy, dear bot :)

s1hofmann avatar Jul 01 '22 07:07 s1hofmann

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Aug 02 '22 02:08 github-actions[bot]

I’ll disable this automation again…

s1hofmann avatar Aug 07 '22 00:08 s1hofmann

Status update: Implemented unicode keyboard support for macOS. WIP.

s1hofmann avatar Sep 23 '22 20:09 s1hofmann

Window version is working as well.

s1hofmann avatar Sep 25 '22 18:09 s1hofmann

A first version is now available via @next

npm i @nut-tree/nut-js@next

Please give it a try and report any errors!

s1hofmann avatar Sep 27 '22 22:09 s1hofmann

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.

raphaelmenges avatar Nov 18 '22 09:11 raphaelmenges