3

I want to make AutoHotKey listen to a key sequence, specifically Start-C -> D, and do some action. How can I do that? I couldn't find a way to define a key sequence.

Ram Rachum
  • 5,121
  • 14
  • 58
  • 80
  • Check out AutoIt (what autohotkey was based on), _WinAPI_SetWindowsHookEx() function for complete key sequence capture. – MaQleod Sep 01 '11 at 16:11

1 Answers1

6

Here's an example that lets you press Win+C, then it waits for one more key.

#c::
  Input, x, L1

  if x = d
  {
    Send 1 ;do something
  }
  else if x = e
  {
    Send 2 ;do something else
  }

Return

See the Input documentation for more ideas and examples.

Bavi_H
  • 6,610
  • 26
  • 27