Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In AutoHotkey, how can I do the following:

While Space and W are pressed down at the same time, send LShift every X milliseconds; do this until Space and W both are released.

I'm a beginner; what I tried, failed...

Any help would be much appreciated!

Edit: I tried:

w & `::
  Loop  {
    If GetKeyState("Space", "P") && GetKeyState("w", "P") {
      Send, {LShift}
      Sleep, 500
      If Not GetKeyState("Space", "P") && GetKeyState("w", "P") {  
share|improve this question
What did you try? – Darth Android May 17 '13 at 20:42
; vk57 & vkC0:: ; w+tilde
Space & vk57:: ; space+w
      SendInput, % "{vkA0}" ; lshift
      Sleep, 500
   ; replace "Or" with "And" keywords for to see difference
   Until, !(GetKeyState("Space", "P") Or GetKeyState("vk57", "P"))
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.