1
votes

Ideally I'd like ctrl+space to bring up "search everywhere" from anywhere in windows (8.1) and also dismiss it if it's already active (with something like #IfWinActive ...).

So far I've been able to make ctrl+space simulate pressing the winkey with the following AutoHotKey script:

<^Space::
KeyWait Ctrl
Send {RWin}
return

...but not winkey+s. It feels sort of hackish anyway because it doesn't initiate "on press." It only initiates once I've released the ctrl key.

P.S. If I can't get this figured out I'm taking suggestions for a good third party launcher application


EDIT: Thanks to Robert. Here is the result:

<^Space::
SendInput {RWin Down}s{RWin Up}
return
2
Are you trying to send <kbd>win+s</kbd> by pushing <kbd>ctrl+space</kbd>?bgmCoder
Yes, exactly. Sorry if I was unclear. I'm thinking about using a launcher like Launchy because you can specify the hotkey but not if I don't have to.TheBlackKeys
Why do you use KeyWait Ctrl if you want the hotkey to trigger directly?MCL
Because I'm just kind of hacking this thing together and the script would stop working whenever I removed that line. But for some reason it is working perfectly after removing that line plus changing Send {RWin} to SendInput {RWin Down}s{RWin Up}.TheBlackKeys

2 Answers

3
votes

One way to do this is through:

 SendInput, {RWin Down}s{RWin Up}
0
votes

Really simple:

^Space::SendInput, #s