Home Download Screenshots Wiki Plugins Translations Developers Donate Forums/Help Contact Us |
StrokeIt
windows 7 alt problemPosted by kibox
Hi, has anyone found a solution to this problem? I keep getting this problem randomly sometimes it happens several times in a row sometimes not. This is even off a fresh install of windows 7 ultimate 32 bit. Can get very annoying at times, but this program is too awesome to give up, so it would be great if someone can provide some sort of fix. TIA.
Hmm that is pretty annoying. I have no solution. At least it would be useful to know whenever alt is pressed down. I have this Autohotkey script that will show a tooltip "Alt" next to the cursor whenever alt is pressed down:
#Persistent SetTimer, AltKeyTimer, 20 return AltKeyTimer: GetKeyState, AltState, Alt if AltState = D { MouseGetPos, Px, Py ToolTip, Alt, Px+30, Py+40, 5 } else { ToolTip,,,, 5 } returnNote that his code only works for me if I put it in its own, separate script file - I don't know why; I simply don't understand Autohotkey well enough.
Just did a fresh install and still have the problem. Straight from the package settings as well.
Cerberus, just tried your script. Used it for 10 minutes and it never stuck. Thought the script might of been stopping alt from sticking. Quit it and tried again 5 minutes later and the first window I closed triggered it. This thread is almost 11 months old now and nothing has been done about this problem. It's a major testament to StrokeIt that even with this problem we've stuck with it (that and there's nothing else out there like it.), but please - can we have a fix soon?
Cerberus Wrote:
------------------------------------------------------- > Note that his code only works for me if I put it > in its own, separate script file To run this code together with other code, the position of the line "SetTimer, ..." is important. It should be placed before the first "return", else it isn't executed. I've also seen this "double click folder opens properties", but very seldom and I can not reproduce it. If that only happens on Alt+F4, I would try Post Message WM_CLOSE instead.
I only notice it locks up the ALT command when i am drawing the C gesture, which means to close down the program. I do not ever recall seeing this problem occur in windows xp back then when i used it. Though this bug seems to be very random, i do notice that the issue does appear more when using the gestures while the computer resources are running high.
Hmm this seems to be a complicated issue. I forgot, but I suddenly remembered that I used to have his issue on XP Pro SP 2 too! I had no idea what was the culprit, I don't think I ever narrowed it down to SI. However, I think I have seen this issue perhaps only once a month or so during the last couple of years; perhaps SP 3 fixed it for the most part, or SI's new versions fixed it for XP (I am using XP Pro SP3 now with SI 0.97). Too bad it is still plaguing Win 7.
Joe, thanks for your explanation; I thought it was something like that, but I am used to puttng all parts of a script together that work towards a single goal, instead of separating it into categories - which is why I never got this right. So it seems that the problem is limited to an alt press triggered by SI. Now this seems like something that must have been tried before, but why don't you have SI send out a different hotkey, say, Win+shift+control+C to close a window, then have Autohotkey pick it up to do the alt press? You use this simple code: #+^c::!F4Otherwise, the Win message would seem like a good idea. Edited 1 time(s). Last edit at 11/20/2010 10:34PM by Cerberus.
lol, well that didn't work, not really sure what i was really doing, however i just went to the global actions/closewindow/alt+f4 and changed the alt+f4 to what you mentioned above Win+shift+control+C and it seems to break the close command. Someone has got to know a solution too this. If we keep this post alive, someone will eventually post an answer to this bug.
UV did you place the code into a working autohotkey file?
I tried Cerberus's alternative and it seems to work though I had to drop the ctrl as stroke didn't seem to like Win+shift+control+C. It kept changing it to Win+shift+control+F4. However I encountered a new problem - the Shift and Win keys stuck. It's only happened a couple of times - nowhere near as often as the alt problem but it has happened. This is definitely a problem with strokeit not releasing keys. Just did a little extra testing and, thanks to Cerberus's alt sensing script, it seems only to happen on fast, short strokes. Because I close things mostly with strokeit I've gotten pretty fast at it, faster than other gestures which is why it is mostly happening on close gestures. I can reproduce it pretty well now. It's worst under a moderate CPU load i.e. 50% or more.
Hmm so it seems any modifying key in SI can get stuck. Teamyoyo, you said you'd tried setting AHK to release alt after an alt press; I seem to remember that AHK doesn't work too well when you want it to handle a certain key upon triggering that same key (alt triggers alt release); however, perhaps it is worth a try to have SI carry out Win+C, then have AHK convert this Win+C into Alt+F4, then make a separate .ahk file to sleep 100 + release Win whenever Alt+F4 is pressed. I think perhaps AHK does some things differently with threads and handles when it has separate processes. I believe
~!F4::should trigger extra things upon pressing Alt+F4 without interfering with Alt+F4 itself. If this doesn't work, perhaps the most sensitive SI actions could be made to carry out Win+key, then AHK converts it etc., but with a global AHK timer that releases Win every 1000 milliseconds, or whenever Win is held down for longer than 500 ms (I could make that). I would use the Win modifier for this (Win+key), because a timer that resets/releases alt might interfere with other things/hotkeys/programs, whereas the Win modifier is not used a lot, at least not by me. I have no idea whether this would work, nor do I have any way to test it, but it might be worth the effort to try.
UV, what you do is this.
0. Set Strokeit to win-shift-c instead of alt-F4. 1. Google, download, and install Autohotkey. 2. Open Notepad or any plain text editor, and paste the code (#+c::!F4) I gave into a new Notepad document (leave out the brackets). Note that # Is win, ^ is control, + is shift, ! is alt; the :: is what creates the hotkey conversion. 3. Save the document as a file (name doesn't matter), but make sure the file's name ends in .ahk. 4. Double-click the .ahk file you just made. It should give you a green icon in the system tray. If it opens in Notepad, the extension is wrong: it must be .ahk, not .ahk.txt. If Windows has file extensions hidden, that might be the problem: Google how to unhid them, then check the file's extension again. Now the script is active and you can try the gesture. Note that Teamyoyo now got some problems with sticking win and shift keys... Edited 2 time(s). Last edit at 11/21/2010 11:12AM by Cerberus.
Been playing around and have what appears to be a reasonably simple solution. I've been using it for about a hour without any problems. I changed strokeit's close command back to Alt+F4 and added this
~!F4::Sleep, 100 Send {! Up} returnto my AutoHotKey file. I've tried something similar before but only for instances of alt not alt+F4. I'll keep using it for a couple of days and see if there's any problems.
teamyoyo Wrote:
------------------------------------------------------- > ~!F4::Sleep, 100 > Send {! Up} > return If you place a command right of "::", the code stops after the first line, the following lines are not executed. (See the [url=http://www.autohotkey.com/docs/Hotkeys.htm#Intro]docs[/url]). So the posted code does nothing but wait for 100ms. With a word-wrap after "::" it may work as expected. But I think this could be done by StrokeIt without any tools. StrokeIt supports multiple commands for a single gesture, for example: 1. command: Hotkey: Alt+F4 (or Send Keystrokes: [ALT_DOWN][F4][ALT_UP]) 2. command: Delay: 500ms 3. command: Send Keystrokes: [ALT_UP] Has anyone tested this?
hey joe, i entered in the delay and send keystrokes demand, i haven't encountered the alt bug yet, but it is so random for me and still early, however what i am noticing is, after i put in the send keystroke cmd, from time to time when i do the close gesture i am hearing a ding sound. If i remove the cmd it doesn't make the sound.
Also to gemisigo when i select the Post Message option, there are other options that need to be filled out or where am i suppose to place the WM_CLOSE cmd? where it says "send message to" which option do i select? Also "Message Parameters" what info do i need to enter?
If you want to use it to close a window, it's quite simple.
Most of the time you want to close the current window so that should be the target of Send Message To. The other ones can help if you want to close one specific window from an other (or any other). The Message ID is WM_CLOSE (one of the few built-ins). Not any other parameters needed. WM_WHATEVER message IDs are just label for a plain integer value. Many interesting things can be achieved by sending/posting messages, not only those predefined. I suggest you google it. It's worth the effort. I hope that helps.
I've experienced an anomaly using WM_CLOSE that I did not meet using the ALT+F4 hotkey. When triggering it first on the desktop it DOES close the desktop. On the second run it pops up the shutdown/restart/etc. dialog. That does not happen with ALF4 :) it immediately brings up the dialog window?
May I as a few of you to check this out? |