octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.34k stars 953 forks source link

robot.keyTap('ñ') not working for any accented characters. #518

Open shubhibhatt2007 opened 4 years ago

shubhibhatt2007 commented 4 years ago

I am very new to robotjs,please help if someonne has faced simillar issue before. I need to press a key on my desktop application - some Spanish,German and Portugese characters. I am trying to send a few accented characters using keyTap method. But I get "Error: Invalid key code specified." error each time. Non accented characters working fine though.

Expected Behavior

keyTap should work with accented characters.

Current Behavior

Gettinng "Error: Invalid key code specified." error each time.

Steps to Reproduce (for bugs)

I am just trying to send keyTap for a shortcut on my desktop App. the shortcut is - ñ. robot.keyTap('ñ')

Context

Also occurinng for other accented characters like - ö,ä etc

Your Environment

oktapodia commented 4 years ago

Can you add a reproducible example please?

amunhoz commented 4 years ago

I think is very simple to replicate the problem:

var robot = require("robotjs"); robot.keyTap('ñ')

Result: Error: Invalid key code specified.

OS: Ubuntu 18.04

Have the same problem here.