 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Mon Mar 01, 2010 1:20 pm Post subject: Disable auto-repeat for all function keys (F1 .. F12) |
|
|
Hello,
I want to disable auto-repeat for all function keys (F1 .. F12). If there is one of the modifier keys (Shift, Ctrl, Alt) additionally pressed, this modifier must be passed to the application, too.
As you can see, the code is quite long only for key F1, and, well, it's easy to duplicate this code eleven times.
But I was not successful to create a loop to solve this problem. Any help would be appreciated. Thanks, Stefan
| Code: | $F1::
sendevent {F1 down}
keywait F1
sendevent {F1 up}
return
+$F1::
sendevent +{F1 down}
keywait F1
sendevent +{F1 up}
return
!$F1::
sendevent !{F1 down}
keywait F1
sendevent !{F1 up}
return
^$F1::
sendevent ^{F1 down}
keywait F1
sendevent ^{F1 up}
return
|
|
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1651 Location: Denmark
|
Posted: Mon Mar 01, 2010 2:13 pm Post subject: |
|
|
| Code: | ; create dynamic hotkey for f1..f3
Loop 3
Hotkey $*f%a_index%, f_all
Return
f_all:
; only send key (and show tooltip) if prior key wasn't the same as this key
if (A_ThisHotkey != A_PriorHotkey)
{
Send % "{" substr(A_ThisHotkey,3) "}"
ToolTip %A_Now% %A_ThisHotkey%
}
Return
|
_________________ RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|