Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried the following AutoHotkey macro to press the c, f and k keys all at once:

1::
SendInput cfk {enter}
Return

This code is just giving cfk, but doesnt press this keys at once.

How do I do this?

share|improve this question

migrated from stackoverflow.com Jun 4 '11 at 14:09

This question came from our site for professional and enthusiast programmers.

1 Answer 1

In the way that you've done things at the moment the first key is released before the second is pressed. You need to tell AutoHotkey to hold the key down. Try this:

1::
SendInput {c down}{f down}{k down}{c up}{f up}{k up} {enter}
Return

This tells AutoHotkey to press the key, but don't forget to tell it to lift the key up again afterwards ;).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.