Jump to content

Hotkey Problem


Recommended Posts

Wasn't sure if i should put this in bug reports or not but eh.

Anyway i've noticed several issues with the Hotkeyset() function.

The main problem i've been having is that after calling a hotkey the modifyer(s) (win,ctrl,alt,shift) can become stuck on down until i press the modifyer to unstick them. This can be worked around by using a send(all the modifyers) command at the end of a hotkey function but it's crude and it shouldn't be necessary. To clarify what i mean, if I call a hotkey that's been set with win+ctrl+1, then release the keys, sometimes the win key will remain pressed after i remove my hand from the keys, sometimes ctrl, sometimes both. As you can imagine this is very annoying.

The other problem i suspect is more a limitation of the Hotkeyset() function, but if someone knows of a way around it that would be cool. The problem is that if u want to do two sequential keypresses u have to release all keys between keypresses. For example if i want to call win+ctrl+1 then win+ctrl+2 i have to do the following. Press and hold win+ctrl, tap 1, release win+ctrl repress and hold them, tap 2. It would be far better/easier if they could be triggered with. Press and hold win+ctrl, tap 1, tap 2.

Link to comment
Share on other sites

I didnt realize this problems but another...

It changes my some keys of my spanish keyboard sometimes .. I dont know why,

some like & ( $ % : * are changed,

Is it a bug?

Thanks

Edited by BasicOs
Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

  • 2 years later...

if I call a hotkey that's been set with win+ctrl+1, then release the keys, sometimes the win key will remain pressed after i remove my hand from the keys, sometimes ctrl, sometimes both. As you can imagine this is very annoying.

I have this exact same problem! Even sending the keys again (using Send() function) doesn't always clear the problem. Have any of the devs addressed this issue? I'm using AutoIT version 3.2.4.9 and I STILL have this problem... It seems like it was less of a problem when I was using an older beta version (before the big release this last spring). :)

Please, if anyone has any help on this issue, please post.

keywords: hotkey shift control alt windows stuck sticking hotkeyset()

“Efficiency is doing things right; effectiveness is doing the right things.”-Peter F. Drucker

Link to comment
Share on other sites

  • 4 months later...

I too have had a very difficult time with this issue. I have written a script for use in a point of sale environment at my workplace, and all of my hotkeys are activated with "CTRL+Shift+(x)". Every once in a while, one or both of the keys remains "stuck" after using the shortcut. The only way I have found to get them "un-stuck" is to physically press the keys again.

One method around the issue is to put some sort of message or prompt box to activate first, prior to whatever it is your hotkeys are doing. That, or place a sleep time of about 400ms to go off before the command itself. Prompt boxes are simply out of the question most of the time, and the sleep function wastes time/doesn't always work.

I have over 90 staff accross 4 stores using the app, and I get constant complaints about the issue.

Any tips as to how to get around it would be greatly appreciated. Thanks.

As an example, this one locks those two keys *every* time I press the hotkey, on any computer (WinXP) I try it on.

CODE
HotKeySet("^+t", "Type")

Run("Notepad.exe")

WinWaitActive("Untitled - Notepad")

MsgBox(0, "Start", "Press CTRL+Shift+T to see the example")

Func Type()

Send("Either 'CTRL' or 'Shift' will most likely be stuck after this is typed.")

EndFunc ;==>Type

While 1

Sleep(9999)

WEnd

Link to comment
Share on other sites

Well. I think I may have got it.

CODE
#include "Misc.au3"

HotKeySet("^+t", "Type")

Run("Notepad.exe")

WinWaitActive("Untitled - Notepad")

MsgBox(0, "Start", "Press CTRL+Shift+T to see the example")

Func Type()

While _IsPressed(11)

Sleep(100)

WEnd

While _IsPressed(10)

Sleep(100)

WEnd

Send("Either 'CTRL' or 'Shift' will most likely be stuck after this is typed.")

EndFunc ;==>Type

While 1

Sleep(9999)

WEnd

Go-go forum search!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...