Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

stuck ctrl key?


  • Please log in to reply
24 replies to this topic
A stuck ctrl key
  • Guests
  • Last active:
  • Joined: --
Everyone is having the same problem, so why is there no fix?

-I think it might be too difficult to control the problem from happening, but how about a solution?

jujuandhuhu
  • Members
  • 7 posts
  • Last active: Mar 26 2012 09:36 PM
  • Joined: 20 Oct 2011
Hi

I've encountered the same problem.

The following code causes the Ctrl key to get stuck:
Send, \{Enter}
while
Send, \
Send, {Enter}
doesn't cause any problems.

Interestingly enough, the Ctrl key gets stuck only in SciTE and not in other applications.
Pressing the Ctrl key manually releases it.

fragman
  • Members
  • 1591 posts
  • Last active: Nov 12 2012 08:51 PM
  • Joined: 13 Oct 2009
I've also observed ctrl key getting stuck in SciTE, but I haven't looked after the reason for it...maybe this is it...

another guest
  • Guests
  • Last active:
  • Joined: --
I've been able to release the stuck key using SUSPEND back-to-back right after using {control down}, etc.

suspend on
suspend off

It seems to work for me.

Everyone is having the same problem, so why is there no fix?

-I think it might be too difficult to control the problem from happening, but how about a solution?



mixer
  • Members
  • 4 posts
  • Last active: Jan 27 2012 07:01 PM
  • Joined: 17 Jan 2012
Yes, I am having the same problem.

jahf
  • Members
  • 1 posts
  • Last active: Feb 14 2012 11:25 PM
  • Joined: 14 Feb 2012
I was having the stuck modifier problem on some scripts I use while gaming (which are fairly long AND get mashed quickly). I was able to cure it with:

SendMode InputThenPlay

which told the script to use SendInput for any "Send" commands I wrote and if SendInput isn't valid then to try SendPlay. The default "Send" command seems to be the problem.

It won't work for EVERY case out there, but give it a shot to see if it helps you.

Sam Bo
  • Members
  • 264 posts
  • Last active: Sep 03 2017 05:39 PM
  • Joined: 03 Dec 2011
:mrgreen: I have found interesting the answers of Jahf and Another Guest.
I'll tray with them. Can you give more details about how to insert it into a code?

Meanwhile I leave this to watch if a key is stuck:

Settimer, EYE, 300
Return

EYE:
GetKeyState, state, Control
if state = D
{
SplashImage,,b x0 y715 H20 W50 ZY0 ZX0 fs9 ct1C3DB8 cw82BD3A, CONTROL, , ,Arial
   SetTimer, CHEkIFupCtrl, 200
Return

CHEkIFupCtrl:
GetKeyState, state, Control
if state = U
  {
   SplashImage, Off
   SetTimer, CHEkIFupCtrl, Off
  }
  Return
}


tris
  • Guests
  • Last active:
  • Joined: --
Hi guys -

I know this thread is old, but I was having the same problem, and none of the solutions really worked well for me. I'm sure SendInputThenPlay would have worked, but I needed a key delay (because Lotus Notes is insanely slow).

Here's an example of what I was using:

!l:: Send {alt}ayr          ;reply all = alt+l

And I was getting intermittent problems with Control sticking, for some reason. I have fixed it completely by just waiting for Alt to be released, as follows:

!l::	;reply all = alt+l
	KeyWait Alt
	Send {alt}ayr
return

All problems eliminated. Hope this helps someone else!

Cheers
Tris.

lokisdottir
  • Members
  • 1 posts
  • Last active: Aug 29 2014 03:47 PM
  • Joined: 21 Aug 2014

This may be relevant for those who use Capslock as a Control replacement. I was having a horrible time with Control getting stuck after using Capslock-Control. When I looked at the key log I realized the below code seemed to be causing the problem, as pressing Capslock triggered {Ctrl downtemp} but not a corresponding release of the Control key on Capslock up. According to my research this is evidently because Windows still treats Capslock as a toggle key.

;Code that caused control key to get stuck
Capslock::Control

So I did the following instead, adapted from an answer I found on a different Q&A thread:

;Code that resolved the issue
$Capslock:: Send {Ctrl down}
$Capslock up:: Send {Ctrl up}

I'm not sure if the $ is necessary, but so far it works and I no longer get the stuck Control key problem. It's quite a relief.



gwebbahk
  • New members
  • 1 posts
  • Last active: Sep 09 2015 08:28 PM
  • Joined: 09 Sep 2015

:mrgreen: I have found interesting the answers of Jahf and Another Guest.
I'll tray with them. Can you give more details about how to insert it into a code?

Meanwhile I leave this to watch if a key is stuck:
 

Settimer, EYE, 300
Return

EYE:
GetKeyState, state, Control
if state = D
{
SplashImage,,b x0 y715 H20 W50 ZY0 ZX0 fs9 ct1C3DB8 cw82BD3A, CONTROL, , ,Arial
   SetTimer, CHEkIFupCtrl, 200
Return

CHEkIFupCtrl:
GetKeyState, state, Control
if state = U
  {
   SplashImage, Off
   SetTimer, CHEkIFupCtrl, Off
  }
  Return
}

This is a cool script.  Don't you need to add #Persistent to the top!?!?  (I did.)