Open wallezhang opened 3 years ago
try another key combination, like "Alt+Shift+n"
try another key combination, like "Alt+Shift+n"
Yes! It worked!! I found key combination with Command
or Control
will not work. Is there a conflict?
BTW, robot.keyTap()
function is work as expect whatever key combination i use.
Expected Behavior
I register a global shortcut in electron, and in callback call
robot.typeString()
function. But it seems not work, nothing to be typed. If i callrobot.keyTap()
function first, and then callrobot.typeString()
function, that will type a truncate string at first time, and i press the global shortcut again, then it types normal string what i want.Steps to Reproduce (for bugs)
Here is an example code
Above code is not work when i press the shortcut
And if i call
robot.keyTap()
firstWhen i press shortcut first, it will type an enter without any string, and then i press shortcut again, it will work.
Your Environment