JAVA Robot鼠标事件在oSX mavericks的登录屏幕上不起作用,但在较低版本上起作用

JAVA Robot鼠标事件在oSX mavericks的登录屏幕上不起作用,但在较低版本上起作用,java,macos,awt,awtrobot,mousepress,Java,Macos,Awt,Awtrobot,Mousepress,我使用LaunchAgent在登录窗口中运行java应用程序,它远程捕获鼠标和键盘事件并执行它。键盘事件正常工作,但鼠标事件不能正常工作 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0">

我使用LaunchAgent在登录窗口中运行java应用程序,它远程捕获鼠标和键盘事件并执行它。键盘事件正常工作,但鼠标事件不能正常工作

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.ash.login</string>
    <key>LimitLoadToSessionType</key>
    <string>LoginWindow</string>
    <key>RunAtLoad</key>
    <true/>
    <key>Program</key>
    <string>/usr/bin/java</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/bin/java</string>
        <string>-jar</string>
        <string>-Dapple.awt.uielement=true</string> (Works sometimes without this option)
        <string>/Library/Ash_Agent/data/remote.jar</string>
    </array>    
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>

我相信这是因为Robot在内部使用CGEventPost而不是不推荐的CGPostMouseEvent,但是CGEventPost在预登录中不起作用。

Chromium远程处理似乎在预登录中为键盘事件执行CGEventPost,它可以工作,你能检查并告诉我吗?
Untrusted apps are not allowed to connect to or launch Window Server before login.
Window Server is not available