Fix it? Or don't. What I really want is to do a is command+click, so if we implemented passing modifier keys to mouseClick and mouseToggle that would serve my use case. This was brought up in https://github.com/octalmage/robotjs/issues/355 but the work-around there isn't working for me because keyToggle doesn't appear to work for modifier keys on my mac.
Expected Behavior
robot.keyToggle("shift", "down")
should hold down the Shift key.Current Behavior
It doesn't hold it down long enough to modify the next keyboard event. Seems similar to these issues: https://github.com/octalmage/robotjs/issues/132 https://github.com/octalmage/robotjs/issues/683
Possible Solution
Fix it? Or don't. What I really want is to do a is command+click, so if we implemented passing modifier keys to
mouseClick
andmouseToggle
that would serve my use case. This was brought up in https://github.com/octalmage/robotjs/issues/355 but the work-around there isn't working for me becausekeyToggle
doesn't appear to work for modifier keys on my mac.Steps to Reproduce (for bugs)
If I run this script, it types "a".
But if I run this script, it types "A".
This just does a regular click, not a shift+click.
Context
I want to be able to command+click.
Your Environment