 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
dave49er Guest
|
Posted: Thu Sep 30, 2004 12:40 am Post subject: Map "Ctrl Ctrl" to "ScrollLock ScrollLock UpA |
|
|
Can I do this?
Thanks |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Thu Sep 30, 2004 2:15 am Post subject: |
|
|
I'm not sure if this is exactly what you're after: | Code: | ; This method avoids unwanted firing when you hold down the control key for a long time (which causes auto-repeat).
; It also relies on #MaxThreadsPerHotkey being its default of 1.
~RControl::
if A_PriorHotkey <> ~RControl
{
KeyWait, RControl
return
}
if A_TimeSincePriorHotkey > 400
{
KeyWait, RControl
return
}
Send, {ScrollLock 2}{Up}
MsgBox You double-tapped the right control key.
return |
|
|
| Back to top |
|
 |
dave49er Guest
|
Posted: Thu Sep 30, 2004 8:25 pm Post subject: |
|
|
Thanks for your quick response. I think that might be the answer.
The situation I have is this: I have three KVM (Keyboard, video, mouse) switches that I use regularly (2 at home, 1 at work). On two of them I press Ctrl Ctrl (sort of like a double-click, either left or right) to switch back and forth between the two computers attached to the switch. On the third I either have to do ScrollLock ScrollLock 1 for comp 1, ScrollLock-ScrollLock-2 for comp 2, or ScrollLock ScrollLock UpArrow (next comp) or ScrollLock ScrollLock DownArrow (prev comp) to switch to the other comp. Since the switch only has two ports, the end result of Up or DownArrow is the same. It seems like the firmware for this switch is one that was designed for an 4, 8, or more port switch, and they didn't feel like writing a new one for the 2-port switch.
I hope that long explanation didn't bore you, but Ctrl Ctrl is much easier to use than the 3 key combinations as you don't have to move your finger real fast to another part of the keyboard, and I wouldn't have to think "Which KVM am I using right now?" if I could emulate ScrollLock ScrollLock UpArrow with a quick Ctrl Ctrl.
Thanks for your help! |
|
| Back to top |
|
 |
Pallie
Joined: 05 Jul 2004 Posts: 57 Location: London
|
Posted: Thu Sep 30, 2004 9:46 pm Post subject: |
|
|
I'd be interested to hear if it works. I have a KVmswitch too where you have to use PrtSc to swap. The trouble is that it keeps capturing the screen to the clipbaord so something like dbl cntrl would be better.
I would have thought that the KVM switch would capture the screenpress, not the PC so unless you can install AHK on the KVM then it will not recgnise it. When I tried with mine that seemed to be the case so I gave up.
Mike |
|
| 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
|