inputemu function works continuously

2 次查看(过去 30 天)
I want to use inputemu to simulate a <return/enter> key. However, when I use this function it doesnt stop, it presses <return/enter> continuously.
inputemu('key_normal','\ENTER');
How do I use inputemu to only press it once?

回答(1 个)

Jan
Jan 2021-1-26
Perhaps this is sufficient already:;
robot = java.awt.Robot;
robot.keyPress(java.awt.event.KeyEvent.VK_ENTER);
robot.keyRelease(java.awt.event.KeyEvent.VK_ENTER);

类别

Help CenterFile Exchange 中查找有关 Robotics 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by