Robotjs: Special chars/Shift key not working

Created on 2 Dec 2017  路  4Comments  路  Source: octalmage/robotjs

As the title says special chars, i.e. '@' cant be typed using typeString or typeStringDelayed method. For the case of '@' with US keyboard, '2' is typed. This leads me to conclude that shift key is not working somehow.

I use Ubuntu 16.04, more specifically this AMI from AWS EC2 https://aws.amazon.com/marketplace/pp/B01MEG2PVE?ref=cns_srchrow

node version is v8.9.1
robotjs version as per package.son is {... "robotjs": "^0.4.7", ...}

I know there are earlier versions of the same issue, but they seem to be resolved by some pull requests. I would like to make one if you can point me to the part of the code that needs to be edited.

Most helpful comment

Same here. Looks like a lot of characters can not be used in "typeString" method.

All 4 comments

I used tapKey workaound with shift modifier, but I will still leave the issue open so it can be investigated

Same here. Looks like a lot of characters can not be used in "typeString" method.

Not even 盲枚眉脽 is working. Best solution would be if the keyTap/keyToggle would accept keycode/rawcode (like from iohook) too. So you can just enter integer keycode in keyTap instead string which its limited.

As example, if you want to enter "E", which code for "E" is 69, so you enter "robot.keyTap(69);" to tap "E", This allow us more chars support.
For typeString -> maybe arrays of chars so it can support special chars too?

More information about virtual key:
https://msdn.microsoft.com/de-de/library/windows/desktop/dd375731(v=vs.85).aspx

[edit]
I realized this is about typeString and not keyTap/keyToggle, so I created new issues for that https://github.com/octalmage/robotjs/issues/386

This issue has been closed because it has been inactive for > 180 days.
You may reopen this issue if it has been closed in error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Multiply picture Multiply  路  6Comments

pg07codes picture pg07codes  路  3Comments

saghul picture saghul  路  6Comments

piyushpatil027 picture piyushpatil027  路  3Comments

bradparks picture bradparks  路  14Comments