stuck ctrl key?
#1
Posted 03 May 2005 - 08:17 PM
Bruce
#2
Posted 03 May 2005 - 08:54 PM
In the meantime, one thing that might help when the keys get stuck is to press and release the Control key, which should reset it without even needing to restart the script.
#3
Posted 03 May 2005 - 10:11 PM
Here's my script:
#singleinstance
#installkeybdhook
#notrayicon
#usehook
!Browser_back::send, !{home}
!Browser_forward::send, !{end}
^+Browser_back::send, ^+{home}
^+Browser_forward::send, ^+{end}
+Browser_back::send, +{home}
+Browser_forward::send, +{end}
^Browser_back::send, ^{home}
^Browser_forward::send, ^{end}
Shift & rctrl::send, +{Del}
Browser_back::send, {home}
Browser_forward::send, {end}
rctrl::send, {del}
^!rctrl::send, ^!{del}
*RAlt:: ; The asterisk makes the remapping more complete on XP/2k/NT.
Send, {rwin down}
keywait, ralt
Send, {rwin up}
return
Unfortunately, I have not found any set of keystrokes that seem to 'produce' the problem, and pushing ctrl does not reset it. I've even used windows accessibility to look and see if any keys are 'down' and it does not show them as 'down.' Is there anything else that I should look for in the logs that might help?
Bruce
#4
Posted 04 May 2005 - 08:03 PM
If it's the second one, I've seen that happen sometimes when the active window is deactivated while the CTRL key is down. Later, when you return to that one particular window, it might still think the CTRL key is down because it wasn't watching when you released it.
If the entire system thinks the CTRL key is stuck down, you might try using the following hotkey whenever it happens. Near the top of its window, it will show you what modifier keys are logically vs. physically down:
*ScrollLock::KeyHistory ; Press ScrollLock to display the key history window.
Finally, there's a way to remap keys a lower level using the registry. Although this change is semi-permanent -- meaning that a reboot is required to undo it -- it is a very pure way of remapping that should avoid any possibility of sticking keys.
#5
Posted 08 May 2005 - 11:59 PM
Thanks for the tips. I don't mind the hotkeys being semi-permanent--unless they stick--because I use them all the time.
I'll post later if I find out what's going on more specifically. Since I updated to the latest version, I've not had trouble, but sometimes it goes for days between snags, so I'm not sure the update has changed anything.
Sure appreciate this program!
Bruce
#6
Imago
Posted 12 May 2005 - 04:50 AM
FAN BOOST.ahk
Loop
{
ControlSend, Button8,{SPACE},Dell Inspiron 8000/8100/8200 fan control V2.2.0 - (c) 2004 by C. Diefer
Sleep 15
}Great program, wish it didnt make me type 1337 all the time
:twisted:
I will now turn on AutoHotKey.exe and my Caps Lock and type few bits of garbage:
IT ReAllY suCkS WhEN yOur LAPTOP Gets SO Hot IT BegiNs to SLOw DOWn.
:wink:
#7
Guests
Posted 12 May 2005 - 05:17 AM
FAN BOOST.wbt
AddExtender("wwctl44i.dll")
sAppWndName = "Dell Inspiron 8000/8100/8200 fan control V2.2.0 - (c) 2004 by C. Diefer"
hWnd = cFindByName(sAppWndName)
ControlHandle=cWndByID(hWnd,1000)
While (1==1)
cClickButton(ControlHandle)
TimeDelay(5)
EndWhile
:twisted: :roll: :twisted:
#8
Posted 12 May 2005 - 05:31 PM
SetStoreCapslockMode: Disables the changing of the Capslock key.
The alternate method of sending modifiers, which involves specifying something like {Alt down}f{AltUp} instead of !f. This special mode makes a difference only with ControlSend, not Send. The help file has more details.
#9
Guests
Posted 13 May 2005 - 02:04 AM
the winbatch interpreter has a 614k footprint....im just gunna go with that
cheers
#10
Posted 04 February 2009 - 01:39 AM
After some debugging, I created this test hotkey:
$+b::SendInput llllll
Now if I type shift-b, and then release the shift key before all the "l"s appear on the screen, the shift key gets stuck down.
Why? And how do I get it unstuck?
EDIT: Okay, it looks like I can fix issues like this by throwing in the appropriate "KeyWait" command -- in this case, "KeyWait, Shift".
:mrgreen:
#11
Posted 28 July 2010 - 08:18 PM
Shift + MouseWheel Scroll => Alt + Tab
[For window switching in Windows]
And this works 4 out of 5 times, but seems to stop working
suddenly, or when I switch directions.
Here is my current script
;>>>Scroll Tab<<< Shift & WheelDown::AltTab Shift & WheelUp::ShiftAltTab
I tried capturing the KeyHistory but there isn't anything that seems
wrong outright E.g. 2 Alt presses followed by Tab presses do work
without the script. Though I am not sure I understood the difference
between the type 'h' & 'i'.
VK SC Type Up/Dn Elapsed Key Window ------------------------------------------------------------------- A1 136 d 0.03 RShift A1 136 d 0.03 RShift A1 136 u 0.03 RShift A4 038 i u 0.00 Alt A4 038 d 3.48 Alt N/A 09 00F d 0.09 Tab 09 00F u 0.11 Tab 09 00F d 0.42 Tab 09 00F u 0.14 Tab A4 038 u 0.08 Alt 74 03F d 1.33 F5 C:\My Scripts\MouseHotKeysAndScroll.ahk - AutoHotkey
Any help will be appreciated.
Thanks
#12
mattyjd
Posted 03 August 2010 - 11:51 PM
I am having a similar issue here. It's a simple macro and it happens each time.
^!g::
sendinput {RAW}Please note that if the IR runs lower than quoted pricing and feasibility are subject to change. If the IR drops to 5`% or below we will be on best efforts. Pricing must be confirmed against final quota requirements. We requires your project team to provide us with a specific term report in order to determine final IR. Without this, final billing will reflect the final IR observed in our systems. Our minimum engagement fee is $250. Please let me know if you have any questions.
return
When I use the scroll lock dealy posted here I get:
Window: cavaets [sendinput].ahk - Notepad
Keybd hook: yes
Mouse hook: no
Enabled Timers: 0 of 0 ()
Interrupted threads: 0
Paused threads: 0 of 1 (0 layers)
Modifiers (GetKeyState() now) = LCtrl LAlt
Modifiers (Hook's Logical) = LCtrl LAlt
Modifiers (Hook's Physical) = LCtrl LAlt
Prefix key is down: no
NOTE: To disable the key history shown below, add the line "#KeyHistory 0" anywhere in the script. The same method can be used to change the size of the history buffer. For example: #KeyHistory 100 (Default is 40, Max is 500)
The oldest are listed first. VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event. Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #IfWinActive/Exist.
VK SC Type Up/Dn Elapsed Key Window
-------------------------------------------------------------------------------------------------------------
48 023 i u 0.00 H
41 01E i d 0.00 A
41 01E i u 0.00 A
56 02F i d 0.00 V
56 02F i u 0.00 V
45 012 i d 0.00 E
45 012 i u 0.00 E
20 039 i d 0.00 Space
20 039 i u 0.00 Space
41 01E i d 0.00 A
41 01E i u 0.00 A
4E 031 i d 0.00 N
4E 031 i u 0.00 N
59 015 i d 0.00 Y
59 015 i u 0.00 Y
20 039 i d 0.00 Space
20 039 i u 0.00 Space
51 010 i d 0.00 Q
51 010 i u 0.00 Q
55 016 i d 0.00 U
55 016 i u 0.00 U
45 012 i d 0.00 E
45 012 i u 0.00 E
53 01F i d 0.00 S
53 01F i u 0.00 S
54 014 i d 0.00 T
54 014 i u 0.00 T
49 017 i d 0.00 I
49 017 i u 0.00 I
4F 018 i d 0.00 O
4F 018 i u 0.00 O
4E 031 i d 0.00 N
4E 031 i u 0.00 N
53 01F i d 0.00 S
53 01F i u 0.00 S
BE 034 i d 0.00 .
BE 034 i u 0.00 .
A4 038 i d 0.00 Alt
A2 01D i d 0.00 Ctrl
91 046 h d 2.74 Scroll Lock
It clearly shows that Alt + Ctrl are being pushed down at the end of the script. Perhaps this is because the command is called with ctrl and alt being pressed. This was not an issue before I reverted to 'sendinput' instead of 'send' so I suspect this is the case as sendinput is so much faster.
How can I specify a delay or assure that ctrl+alt are not pressed when I finish the macro?
Otherwise any simple way to assign a hotkey to a macro that avoids this would be appreciated!
#13
Posted 04 August 2010 - 07:28 PM
Text=Please note that if the IR runs lower than quoted pricing and feasibility are subject to change. If the IR drops to 5`% or below we will be on best efforts. Pricing must be confirmed against final quota requirements. We requires your project team to provide us with a specific term report in order to determine final IR. Without this, final billing will reflect the final IR observed in our systems. Our minimum engagement fee is $250. Please let me know if you have any questions. ^!g:: clipboard:=Text Send ^v returnLook at clipboard page for example on how to save/restore the clipboard if you want to retain it.
#14
mattyjd
Posted 06 August 2010 - 04:20 PM
#15
bwarner
Posted 01 September 2011 - 10:37 PM
I have a similar problem.
This script I've written changes the font of selected text in an Outlook email. It does this by opening the font dialog and changing font etc.
Once the font has been changed, both my control and win keys are stuck down. After reading these posts I suspect this is because the script launches a windows dialog.
I've tried various methods to "unstick" these keys; Keywait, sending the UP of both keys, but nothing seems to unstick them.
Any help would be appreciated.
Script is:
^#p::
Send, !o f
SendInput, Courier New
Sleep 500
Send {TAB 5}{DOWN 5}
Sleep 500
Send {ENTER}
Sleep 500
return




