 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Fri Aug 13, 2004 9:55 am Post subject: Hotkeys starts without Windows-key |
|
|
Hello,
I wrote these script:
| Code: | #e::
Run, "C:\Dateien\Symbolleisten\Tools\Explorer.lnk"
WinMove, Verknüpfungen, , 64, 86, 1159, 873
return
#n::Run, Notepad
#i::Run, "C:\Programme\Internet Explorer\IEXPLORE.EXE" "about:blank"
#r::Run, calc.exe |
But sometimes, when I write text, at "r" and "e" the hotkeys will be start. I only type a "r" or "e", without the Windows-key, for example in Word. The other hotkey works fine.
Is the script wrong or is it a bug? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10464
|
Posted: Fri Aug 13, 2004 10:54 am Post subject: |
|
|
Does this seem to happen only when you do certain things, such as launching a program or document -- or is there any other pattern to it?
Background: Since #r and #e are normally used by Windows Explorer, defining them requires the keyboard hook so that the script can take ownership of them. The hook manages these hotkeys by tracking the physical state of modifier keys such as LWin and RWin. If there are times when hook's tracking is interfered with -- such as when a disk is spinning up or you're switching video resolutions -- the hook might think that LWin or RWin is physically held down when it really isn't. This is why only hook hotkeys (i.e. only #r and #e in this case) are affected.
Since this seems to be a problem for others too, I'm planning to give the hook its own dedicated thread. Although that should alleviate the problem, it might not entirely resolve it if there are ways in which the OS can force the hook to momentarily stop tracking keystrokes. Two of these ways are Win+L on XP (lock the computer) and the Ctrl+Alt+Del security screen, both of which are already addressed in v1.0.17 so should not be a problem.
If anyone else experiences this issue, it would help me if you describe the types of things you were doing right before keys get stuck down. So far, I've identified two other cases:
1) If you switch your video card to TV-out (or perhaps switch video resolutions) via an application hotkey, the hook is momentarily disabled in some cases.
2) If you launch a document such as a URL but MSIE takes a long time to launch (because it's not cached), it appears that the script's thread is tied up during the launch, thus the hook cannot track during this time. In this case, a dedicated thread should solve it.
Edit: In v1.0.39, a dedicated thread was added for the hooks. It should prevent keys from getting "stuck down". It should also eliminate mouse/keyboard lag during long operations such as UrlDownloadToFile.
Last edited by Chris on Tue Oct 04, 2005 1:31 am; edited 1 time in total |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Aug 13, 2004 9:08 pm Post subject: |
|
|
Thanks for the information. I forgot, that Win+R are used by the OS. I'm so stupid. It had just occurred to me, that the problem be connected with it. For a workaround I defined other keys for "r" and "e".
The hotkeys will be start, when I write text. It doesn't matter where I write text, like a letter in Microsoft Word or a text in notepad. As soon as I type a "r" or "e" the hotkey starts. I doesn't make something else, I only write text and I doesn't press the Windows-Key.
I write very fast, so your explanation sounds very probably. Perhaps the driver is to busy, because I write to fast. - But, when I think about it, the hotkey will be starts when I write slow, too. OK, I don?t know. I hope, that I helped you with these clue to develop the software.
Michael |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10464
|
Posted: Sun Aug 15, 2004 3:58 am Post subject: |
|
|
| I've made a change that should reduce the problem of sticking modifier keys causing unintended firings of hook hotkeys: Details |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|