1

I have an autohotkey script that is moving the cursor around the screen, clicking and editing data, and (should also) copy and paste information. The copy and pasting does not seem to work and after some troubleshooting I have isolated the issue to be something on my machine that prevents certain keystrokes. Here's an example of what my script does:

^!3::
{
global
CoordMode("Mouse", "Screen")
MouseMove(1180, 385)
Click()
Click()
Send("^c")
Return
}

Everything except that final Ctrl + C works. I isolated it to the ctrl key not registering:

^!3::Send("^c") ; this does not work
^!3::Send("c") ; this works

However, when I run this in a Windows Server VM it correctly copies the selected text, so it just doesn't work on my own laptop.

What troubleshooting steps can I take from here? Environment info:

  • AutoHotkey v2.0.12
  • Windows 11
  • PowerToys 0.82.0 installed but disabled/exited for testing purposes here
1
  • 1
    FIrstly, you shouldn't answer in a question. Answers below are for that. Secondly, no need for EDITs, people can see the question was edited and the edit history.
    – Destroy666
    Commented Jul 4 at 14:05

1 Answer 1

1

The issue was that I was using a keyboard layout created with MSKLC. For some reason, sending commands with Ctrl pressed does not work when this layout is in use. This applied to both copy, paste, undo, and whatever command that required the Ctrl hotkey. Switching to one of the standard layouts included in Windows solved the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .