Open
Description
I want to try using RobotGo for keyboard input control in Windows lock screen state, but the actual call fails.
Here is the sample code for my application:
var err error
time.Sleep(3 * time.Second)
err = robotgo.KeyToggle("1")
err = robotgo.KeyToggle("1", "up")
time.Sleep(1 * time.Second)
err = robotgo.KeyToggle("2")
err = robotgo.KeyToggle("2", "up")
time.Sleep(1 * time.Second)
err = robotgo.KeyToggle("3")
err = robotgo.KeyToggle("3", "up")
if err != nil {
fmt.Println(err)
}
This code runs successfully under normal conditions, but it fails in lock screen state, and the err
is still nil.
In lock screen state, I noticed that the internally used SendInput
method fails, returning Error code: 5(ERROR_ACCESS_DENIED).
However, even when I run the application with SYSTEM privileges, the same error still occurs.
My testing environment is:
OS: Windows 10
Go version: 1.22
Metadata
Metadata
Assignees
Labels
No labels