Opened on Aug 31, 2023 at 2:40:04 PM
Closed on Mar 6, 2024 at 3:01:12 PM
#3974 closed Bug (Works For Me)
Key Stuck when using HotKeySet + Send
| Reported by: | anonymous | Owned by: | Jon |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.15.5 | Severity: | None |
| Keywords: | Cc: |
Description
Problem Description:
When I set Hotkeys to CTRL+ALT+t to a function, that sends("text"), the CTRL and ALT key get stucked.
I tried to send all various combinations to unlock the stuck keys, eg.: {LALT}{ALTUP}{LCTRL}{CTRLDOWN}{CTRLUP}.....
The only thing that fixes the stuck key is to physically press CTRL then ALT on my keyboard.
Code Example:
HotKeySet("!t","passwordsend")
$pwd = "PASSWORD"
While 1
Sleep(100)
WEnd
Func passwordsend()
$temp = ClipGet()
send($pwd)
ClipPut($temp)
EndFunc
Attachments (0)
Change History (7)
comment:1 by , on Aug 31, 2023 at 8:31:57 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , on Sep 1, 2023 at 10:08:47 AM
Ok, the _SendEx is worling.
I was only testing this...
ControlSend("", "", "", "text", 0)
Thanks!
comment:3 by , on Sep 1, 2023 at 10:34:28 AM
| Resolution: | No Bug |
|---|---|
| Status: | closed → reopened |
In fact the pb come from the function executed before the release of the hotkey
If you add a Sleep(250) before the send that's work too
I will ask Jon if such go around can be integrated before startin a hotkey function
Cheers
comment:4 by , on Sep 1, 2023 at 10:34:52 AM
| Owner: | set to |
|---|---|
| Status: | reopened → assigned |
comment:5 by , on Sep 1, 2023 at 5:22:38 PM
| Owner: | changed from to |
|---|
In fact I found how to check that hotkey is un pressed
so I sent the fix to Jon
comment:6 by , on Feb 20, 2024 at 3:33:19 PM
| Owner: | changed from to |
|---|
comment:7 by , on Mar 6, 2024 at 3:01:12 PM
| Resolution: | → Works For Me |
|---|---|
| Status: | assigned → closed |
I recheck with the following script and Ii is working
So I close it with "works for me"
so if you encounter a pb please open a new tcket with a repro script
HotKeySet("{ESC}", "_Exit")
HotKeySet("^!t", "passwordsend")
Global $g_sPwd = "PASSWORD (" & @AutoItVersion & ")" & @CR
Run("notepad.exe")
Global $g_hNotepad = WinWaitActive("[CLASS:Notepad]", "")
While 1
Sleep(100)
WEnd
Func passwordsend()
;~ Local $temp = ClipGet()
;~ Sleep(150)
Send($g_sPwd)
;~ ClipPut($temp)
EndFunc ;==>passwordsend
Func _Exit()
Send("^z")
WinClose($g_hNotepad)
Exit
EndFunc ;==>_Exit

PLease use the forum for questions and read the Wiki FAQ: https://www.autoitscript.com/wiki/FAQ#Why_does_the_Ctrl_key_get_stuck_down_after_I_run_my_script?