Doesn't appear so. Docs don't specify but you seem to need at least one modifier key (ctrl, alt, win, shift)
Not true, at least under WinXP (and by extension, probably WinNT and Win2k as well). Virtually any hotkey can be activated with RegisterHotkey(), even an unmodified letter key. For example, this works in AutoHotkey:
; This reveals that the hotkey is registered rather than handled by the hook:
You must check that ^ ! is in the hotkey because no error return an no hotkey either
Can anyone confirm that this affects Win9x? Because obviously it doesn't apply to WinXP.
On winXP, #d still activates show desktop and doesn't pass it to AutoIt, but no other real problems so far.
You need a keyboard hook to override Windows-reserved hotkeys on an individual basis (i.e. they're already registered by the Explorer, so another app can't easily "steal" them).
A few things that might be problematic with this feature, which I mentioned before:
1) Infinite loops. Here is an oversimplified example (real world examples are usually more insidious and happen when you don't even realize you've done it):
^!d::Send, ^!d ; Infinite loop, possible computer lock-up or other bad things.
Although the above example might not produce a lock-up, a more complex Send that sends more keys could very well do that, or cause your apps to misbehave due to the steady stream of keys being sent to the ever-changing active-window as the user tries to extricate himself from a computer that's seemingly become unresponsive.
2) Any hotkey that uses the Send command to Send its own modifiers might produce unexpected results. Another over-simplified example:
The above will not work as expected (without additional code to handle it) because when the user physically releases the hotkey, the control key will be back in the up position.
3) Minor: Without additional code to handle it, hotkeys that send their own modifiers (e.g. CTRL or ALT) will not be repeatable unless the user releases and presses the modifiers again. This is because the modifiers will be in the up position after the Send() even though the user may still be physically holding them down.
There may be a few other issues.
Edit: Another issue (Jon, you may have already added code to handle this): Without additional code, the hotkey's own modifiers will affect the keys sent by the send command. Example:
^!d::Send, abc ; This might really send ^!a^!b^!c
Edited by cmallett, 06 January 2004 - 11:06 PM.