Skip to content

Keyboard input simulation is not working properly #658

@antonydevadoss

Description

@antonydevadoss
  • Robotgo version (or commit ref): v0.110.1 (latest)
  • Go version: go1.22.3 darwin/arm64
  • Gcc version: Apple clang version 15.0.0 (clang-1500.3.9.4)
  • Operating system and bit: Apple M2 Pro (MacOs 14.5 (23F79) arm64
  • Resolution: 1920 x 1080
  • Can you reproduce the bug at Examples:
    • Yes (provide example code)
    • No
    • Not relevant
  • Provide example code:
...
	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)
	}
...
  • Log gist:

Description

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions