| View previous topic :: View next topic |
| Author |
Message |
rblevow
Joined: 06 Jan 2007 Posts: 2 Location: Boca Raton, FL
|
Posted: Sat Jan 06, 2007 10:44 pm Post subject: Windows Vista: Windows key - Send conflict |
|
|
I'm running Windows Vista Business x64 (release version 2006-11-16) and AutoHotKey 1.0.46.05. I use the Windows key as a shift to activate many actions. All worked well with Windows XP. With Vista, if the action contains a Send and the Windows key remains depressed when the characters are sent, they are interpreted as Windows shortcuts, if possible, rather than being delivered directly to the input stream. For example, if I send the string "Hello" with, say Windows-h and continue to hold the windows key down then "He" will be received by the application but the letter 'l' will lock the system, Windows-l. There is an exception when I have defined an action such as Windows-r that overrides the standard Windows shortcut. Then the letter is to the application.
I can avoid the problem if I quickly release the Windows key, before send can forward the troublesome letter. I'm thinking of adding a short wait before any Send at the beginning of an operation as a work-around.
This issue may be related to the bug report "Windows VISTA: BlockInput and other automation" posted by jptaba on Mar 23, 2006. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
Posted: Sun Jan 07, 2007 3:28 pm Post subject: |
|
|
Thanks for the report. It's disappointing that Vista behaves differently than XP in this way; perhaps it blocks programmatic access to the Windows key.
Have you tried all the sending modes? (e.g. SendEvent, SendInput, SendPlay)
Have you tried things like "SetKeyDelay -1, 0"?
You could also try:
#x::Send{LWin up}text
If all that fails, you might try granting admin rights to the program (AutoHotkey.exe or the script itself if that is allowed).
Please let me know the results of the above because it would give more insight.
Thanks. |
|
| Back to top |
|
 |
rblevow
Joined: 06 Jan 2007 Posts: 2 Location: Boca Raton, FL
|
Posted: Mon Jan 08, 2007 7:08 pm Post subject: |
|
|
Chris,
I tried all of the things you suggested. SendInput, SendEvent, and sending {LWin up} didn't produce any change in behavior. SendPlay resulted in no keystrokes to the program. KeyWait, LWin did the trick but it has the awkward effect of delaying the typing of the string. That's what I'm using for now.
Running AHK as Administrator didn't change anything. I observed, as expected, that AHK will not deliver strings to programs running in Administrator mode unless AHK is also running in Admin mode.
Also, AutoHotKey.ini has to be edited as Admin or it can't be saved. All program directories seem to be locked this way, which makes sense.
Vista is certainly making life more difficult for lots of developers. Seems much more so than any of the previous versions of Windows. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
Posted: Tue Jan 09, 2007 1:15 pm Post subject: |
|
|
From what you said, it appears that Vista blocks programmatic changes to the state of the Windows key. This is unfortunate because it reduces the convenience and effectiveness of macro utilities like AutoHotkey.
In the future, changes will be made to better support Vista. Hopefully, a better workaround can be found for the Windows key (in the meantime, I'm glad you mentioned the KeyWait method).
Thanks for posting your findings. |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 560 Location: Galil, Israel
|
Posted: Tue Jan 16, 2007 8:48 am Post subject: |
|
|
am i being dense or is trying with a $ prefix or forced keyboard hook worth a shot ? _________________ Joyce Jamce |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
Posted: Tue Jan 16, 2007 12:03 pm Post subject: |
|
|
Although I don't see how it would directly help, it might indirectly make a difference somehow.
Also, maybe someone with Vista can also try out LWin::return to see if it completely blocks the LWin key (i.e. so that the Start Menu doesn't appear, and no shortcuts like Win-R work). If it does, that would be good because even though the state of LWin/RWin can't be changed programmatically, physical changes to their state can be blocked. This would help a future version of AutoHotkey provide better Win hotkeys on Vista.
Thanks. |
|
| Back to top |
|
 |
superdave2k
Joined: 15 Oct 2004 Posts: 19
|
Posted: Thu Jan 18, 2007 1:00 am Post subject: |
|
|
| Chris wrote: | Although I don't see how it would directly help, it might indirectly make a difference somehow.
Also, maybe someone with Vista can also try out LWin::return to see if it completely blocks the LWin key (i.e. so that the Start Menu doesn't appear, and no shortcuts like Win-R work). If it does, that would be good because even though the state of LWin/RWin can't be changed programmatically, physical changes to their state can be blocked. This would help a future version of AutoHotkey provide better Win hotkeys on Vista. |
Hmm, LWin::return does nothing but Win-R does still work. However, I've also verify that mappings such as #r::MsgBox, R override Run and show R, so Vista Windows key mappings seem OK for me. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
Posted: Thu Jan 18, 2007 1:18 am Post subject: |
|
|
| Those results are a bit unexpected, but I'm glad to have them. Thanks for sharing them. |
|
| Back to top |
|
 |
superdave2k
Joined: 15 Oct 2004 Posts: 19
|
Posted: Thu Jan 18, 2007 3:32 am Post subject: |
|
|
| Chris wrote: | | Those results are a bit unexpected, but I'm glad to have them. Thanks for sharing them. |
That was on Vista 32-bit; I noticed the OP was running x64. I do know that x64 is a lot more locked down (for example, all drivers must be WHQL signed or they will not install). Perhaps AHK just has these issues on x64? I could try to verify this. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
Posted: Thu Jan 18, 2007 1:59 pm Post subject: |
|
|
| It's not urgent because I'm sure we'll get more reports as Vista becomes more common. I'll probably get it myself one of these days -- but perhaps only for testing purposes until I find some good reasons to make it my primary OS. |
|
| Back to top |
|
 |
ggwwtt Guest
|
Posted: Wed Feb 07, 2007 11:47 pm Post subject: |
|
|
Hey guys I'm an absolute rookie... and having, I think, similar issues... but not Vista.
My trouble started when I upgraded to IE 7
Changed several hotkeys from Win+X to Alt-Ctrl+X
That seems to help.
Also the alt key in IE 7 seems sticky.
I think this is the same topic, maybe not... but things got a little weird with IE7 and I'm still on XP.
I have no plans to upgrade to Vista before the third apology er I mean maintenance release. |
|
| Back to top |
|
 |
samc Guest
|
Posted: Tue Feb 13, 2007 6:25 pm Post subject: more Vista data points |
|
|
I'm having the same problem and have a few additional data points to contribute.
1. So far, the only key combination I'm seeing this with is Win-L.
I'm using the following script:
| Code: | LWin::LCtrl
LCtrl::LWin
|
When this script is running, LWin+D, LWin+R, LWin+E correctly act as Ctrl+D, Ctrl+R, Ctrl+E. Likewise, LCtrl+D, R, and E
perform their respective Win-key combinations.
LCtrl-L however doesn't do anything (passes l through), and LWin-L unfortunately acts like LWin and locks the screen!
2. I tried adding #l::MsgBox, L and now LCtrl-L displays the message box. This doesn't prevent LWin-L from locking the screen.
I wonder if Win-L is handled by a lower part of the OS as a security measure.
3. The $ or * prefixes don't help.
4. I'm running 32-bit Vista.
5. Intermittently, after reloading the script file, the system will act like the Win key is stuck on. Meaning, if I press D or R alone it will respond like I pressed Win-D or Win-R. This continues until I kill AHK and use a physical Win-key combination.
I hope this is helpful. I'd really love to have this working for Vista. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
Posted: Tue Feb 13, 2007 9:42 pm Post subject: Re: more Vista data points |
|
|
| samc wrote: | LCtrl-L however doesn't do anything (passes l through), and LWin-L unfortunately acts like LWin and locks the screen!
...
I wonder if Win-L is handled by a lower part of the OS as a security measure. | Yes, that's probably it. And because of it, there probably won't be a complete solution. Microsoft has apparently decided that the Windows key is the exclusive domain of the OS, similar to Ctrl-Alt-Del and the behavior of FN keys on some laptops.
| Quote: | | 5. Intermittently, after reloading the script file, the system will act like the Win key is stuck on. Meaning, if I press D or R alone it will respond like I pressed Win-D or Win-R. This continues until I kill AHK and use a physical Win-key combination. | Hopefully this will get fixed when I find time to install Vista. Thanks for the report. |
|
| Back to top |
|
 |
Rodolfo Guest
|
Posted: Thu Jun 14, 2007 7:09 am Post subject: |
|
|
I found a workaround (don't know if this has been posted elsewhere...)
At least for the problem I was having in Vista x64, which was that I couldn't run this script because it would press the Win+L combination and lock the computer:
Right on the "l", the problem showed up.... This is my workaraound (as there only seems to be a problem with the letter L, but could work with any letter given its proper ascii code):
| Code: |
#Numpad1::
SendInput myemail@hotmai{ASC 0108}.com
return
|
Hope this help somebody
(Oh and btw, I have UAC enabled and I am running the AutoHotkey.exe with the "Run As Administrator" option turned on because of a special need while launching UltraExplorer through a AHK script ... don't know if my workaraound woulnd't work if the latter conditions didn't exist, but I think it still would). |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Thu Jun 14, 2007 5:21 pm Post subject: |
|
|
| Rodolfo wrote: |
Right on the "l", the problem showed up.... This is my workaraound (as there only seems to be a problem with the letter L, but could work with any letter given its proper ascii code):
| Code: |
#Numpad1::
SendInput myemail@hotmai{ASC 0108}.com
return
|
|
So the problem would occur on the "myemail" part too, right? So I assume your real email address doesn't have an l in it.
Chris, can AHK do this internally? _________________
(Common Answers) |
|
| Back to top |
|
 |
|