go-vgo / robotgo

RobotGo, Go Native cross-platform RPA and GUI automation @vcaesar
Apache License 2.0
9.45k stars 859 forks source link

Keyboard input simulation is not working properly #658

Open antonydevadoss opened 1 month ago

antonydevadoss commented 1 month ago
...
    text := "helloworld12345"
    for i, letter := range text {
        if (i+1)%2 != 0 {
            robotgo.KeyDown("shift")
            robotgo.KeyPress(string(letter))
            robotgo.KeyUp("shift")
        } else {
            robotgo.KeyPress(string(letter))
        }

        time.Sleep(100 * time.Millisecond)
    }
...

Description

Expected Output: HeLlOwOrLd!2#4% Actual output: Helloworld1234%

Could you please help me to resolve this issue? ...