xdotool utilized.

This commit is contained in:
jens 2021-05-06 19:45:48 +02:00
parent 07555845a1
commit a282a95c4e
2 changed files with 25 additions and 20 deletions

View File

@ -337,31 +337,36 @@ public class GUI
@Override
public void run()
{
try
{
/*
* Move the mouse cursor
*
* Using this amount of movements has proven relatively reliable.
* Using less has not always woken up the screen or only woke it
* up, but did not also unblank it, resulting in a well-lit, but
* still black screen.
*/
Robot robot = new Robot();
for(int xCoord = 500; xCoord < 550; xCoord++)
for(int yCoord = 500; yCoord < 550; yCoord++)
robot.mouseMove(xCoord, yCoord);
}
catch(Exception e)
{
}
Miscellaneous.runExternalApplication("/usr/bin/xdotool key ctrl", 0, null, null);
}});
t.start();
}
void moveMouseCursor()
{
/*
* Move the mouse cursor
*
* Using this amount of movements has proven relatively reliable.
* Using less has not always woken up the screen or only woke it
* up, but did not also unblank it, resulting in a well-lit, but
* still black screen.
*/
try
{
Robot robot = new Robot();
for(int xCoord = 500; xCoord < 550; xCoord++)
for(int yCoord = 500; yCoord < 550; yCoord++)
robot.mouseMove(xCoord, yCoord);
}
catch(Exception e)
{
}
}
void getFocus()
{
java.awt.EventQueue.invokeLater(new Runnable()