(1) function as a hotkey when pressed solely by itself(LControl down and up), and
(2) retain its native function as a modifier key as well, when pressed in combination with another key.
However, the following script does not seem to function correctly for: LControl + mouse button.
It will perform the native function but will also trigger LControl as hotkey, unless #KeyHistory=1.
However, if #KeyHistory=1, LControl will not function as a modifier to a keyboard key.
Is there a way to fix this problem by modifying the following script?
Help would be appreciated.
Code: Select all
#KeyHistory=5
; #KeyHistory=1
~LControl::
{
KeyWait, LControl ; wait for LCtrl to be released
if A_PriorKey = LControl ; hotkey mode
{
tooltip LControl is a hotkey
}
else ; native mode
{
tooltip LControl is a modifier
}
return
}