Open Madrox opened 2 years ago
By switching logic, I mean this code here: https://github.com/octalmage/robotjs/blob/c9cbd98ec47378dfae62871f0f2830782322b06d/src/robotjs.cc#L429
At this point, it seems the intented left/right keypress modifier is lost.
Expected Behavior
When sending a keyTap or keyToggle event with a shift modifier, the proper shift key should be sent.
Current Behavior
Currently, lshift is called. This is likely also occuring with other modifiers like ctrl, as the switch logic collapses left vs right into a general modifier.
Possible Solution
Either refactor the modifier logic to distinguish between left and right to send the appropriate key press, or eliminate the
right_shift
modifier and retain shift as its inclusion is misleading.Steps to Reproduce (for bugs)
keyTap("f11", ["right_shift"])
Context
I'm simulating the keypress of a global shortcut, and to distinguish it from normal user behavior in their current app, it should be bound purely to the right shift key (which is never used in their context).
Your Environment