# Autohotkey freezes my keyboard

**URL:** <https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953>\
**Category:** ⚙ Technical Support\
**Created:** [December 14, 2011, 2:00pm UTC](https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953 "2011-12-14T14:00:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Foxtreme](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/foxtreme/32/7_2.png) [@Foxtreme](https://forums.sourceruns.org/u/Foxtreme)\
**Post date:** [December 14, 2011, 2:00pm UTC](https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953/1 "2011-12-14T14:00:00Z")

</div>

Hello all, long time no see!

I’ve been tempted of helping with the HL2 rerun, however… as the topic says, I’m having some trouble with autohotkey.  
Anytime I try to use it, after a minute or two, after pressing any key, the computer doesn’t recognise that key release, and keep it in the pressed state. This results in not being able to use movement and duck keys as the game thinks they’re still pressed.

I’ve tried different AHK versions, changing binds, using mouse to jump, but I can’t find a way to fix this, so I’m asking you guys if you know any fix.

If I can’t fix this, I’ll eventually do a SS HL2 run “without scripts” 😛

---

<div class="post-metadata">

**Author:** ![quadrazid](https://b-cdn.sourceruns.org/letter_avatar_proxy/v4/letter/q/f6c823/32.png) [@quadrazid](https://forums.sourceruns.org/u/quadrazid)\
**Post date:** [December 14, 2011, 5:02pm UTC](https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953/2 "2011-12-14T17:02:16Z")

</div>

Hi, I wont help you.

Oh no, seems like you gotta do a SS… ;D

---

<div class="post-metadata">

**Author:** ![S11](https://b-cdn.sourceruns.org/letter_avatar_proxy/v4/letter/s/d9b06d/32.png) [@S11](https://forums.sourceruns.org/u/S11)\
**Post date:** [December 14, 2011, 6:28pm UTC](https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953/3 "2011-12-14T18:28:29Z")

</div>

Does turning AHK off solve it?

---

<div class="post-metadata">

**Author:** ![Centaurium](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/centaurium/32/206_2.png) [@Centaurium](https://forums.sourceruns.org/u/Centaurium)\
**Post date:** [December 14, 2011, 11:20pm UTC](https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953/4 "2011-12-14T23:20:27Z")

</div>

HOLY PHUCK IT’S PHOX

Wish I could help man, but idk, sounds weird, what’s AHK’s priority set at in task manager?

---

<div class="post-metadata">

**Author:** ![TYPICAL](https://b-cdn.sourceruns.org/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@TYPICAL](https://forums.sourceruns.org/u/TYPICAL)\
**Post date:** [December 15, 2011, 5:29am UTC](https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953/5 "2011-12-15T05:29:14Z")

</div>

You mention duck… What’s the duck key bound to?

Edit: Might as well post your script as well. ^^

---

<div class="post-metadata">

**Author:** ![Foxtreme](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/foxtreme/32/7_2.png) [@Foxtreme](https://forums.sourceruns.org/u/Foxtreme)\
**Post date:** [December 15, 2011, 10:47am UTC](https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953/6 "2011-12-15T10:47:19Z")

</div>

I’ve been trying different binds and scripts, currently I’m testing this one, which is working fine at the moment. I’ll test it a bit more, maybe I just found a way to avoid the freeze o\_O

binds:

```auto
shift - +speed
mouse4 - nothing (ahk bind, spams space)
mouse5 - +duck

```

```auto
*f4:: Suspend, Toggle
*XButton1::
Loop
{                                       
GetKeyState, state, XButton1, P
if State = U
break
; Otherwise:
Send, {Space}
Sleep, 1
}
return

```

edit: I use control to duck previously, could that be the problem?  
edit2: nevermind, the freeze still occur after a few minutes.

---

<div class="post-metadata">

**Author:** ![S11](https://b-cdn.sourceruns.org/letter_avatar_proxy/v4/letter/s/d9b06d/32.png) [@S11](https://forums.sourceruns.org/u/S11)\
**Post date:** [December 15, 2011, 12:33pm UTC](https://forums.sourceruns.org/t/autohotkey-freezes-my-keyboard/1953/7 "2011-12-15T12:33:12Z")

</div>

Try pressing F4 twice when it happens (toggles the script to pause and start again)  
Try raising the Sleep number to 30 or 40  
Try changing Send, {Space} to Send, {blind}{Space}

Those are a few things I changed to my script when I experienced trouble (and yours is exactly the same as mine was), though I haven’t encountered your problem when using it.

```auto
*f4:: Suspend, Toggle
*XButton1::
Loop
{
GetKeyState, state, XButton1, P
if State = U
break
; Otherwise:
Send, {blind}{Space}
Sleep, 40
}
return

```

Also, what CooL said and I asked earlier.
