Home
Download
Screenshots

Wiki
Plugins
Translations
Developers
Donate

Forums/Help
Contact Us

StrokeIt

Focus changing before keys sent.

Posted by QM 
QM
Focus changing before keys sent.
January 19, 2003 04:52PM
<HTML>I'm trying to do a workaround for a Mozilla bug and am running into some trouble. The particularly annoying bug is that sometimes I am unable to type into an input field or the URL bar. The workaround I found is to open the preferences dialog and close it- after that I can type in those areas again. Since there is no official fix to this on bugzilla, I decided to make an action for this. Using Hotkeys with delays in between, I can open the dialog, but then the command that would close it changes focus to the main mozilla window before sending the command. What I am doing is:

Hotkey: Alt-E
Delay
Hotkey: E
Delay
Hotkey: ESC (also tried ENTER and ALT+F4; all three close the dialog)

I tried using the send keystrokes instead of the hotkeys, playing around with the delay, and using the Activate Window command before the hotkey. None changed the focus issue, and the last one actually caused my pointer to disappear. Any ideas are appreciated.</HTML>
Leo
Re: Focus changing before keys sent.
January 21, 2003 03:48AM
<HTML>Hi QM,

Perhaps it's not the solution for you but on my system the following is working:

send Keysstrokes

[ALT_DOWN]e[ALT_UP]e

delay 200 ms

Hotkey ALT+F4

with best regards

Leo</HTML>
QM
Re: Focus changing before keys sent.
January 21, 2003 11:15AM
<HTML>Hmm. I tried what you said, but it still doesn't work for me. The ALT+F4 hotkey closes the browser window rather than the preferences dialog. Something is causing the focus to change and I can't figure out what or why. The focus only changes if the final keystrokes are sent. If I cut out the last part (leaving nothing after the delay) and send type the keys myself, the dialog will close as it should. The moment I let StrokeIt send the keys, the focus changes to the browser window before sending the keys. I am using WinXP and have Windowblinds running. I tried setting it to not skin mozilla, to see if that might work, but it didn't. It probably isn't the culprit anyway, but I can't figure out what is...</HTML>
QM
Re: Focus changing before keys sent.
January 26, 2003 03:35PM
<HTML>No ideas anyone? Jeff? BTW, I just tried the latest beta and the problem is still there, so you didn't fix it by either design or accident :) .</HTML>
Jeff
Re: Focus changing before keys sent.
January 26, 2003 07:57PM
<HTML>When you use the keyboard plugin, it will activate and send the keys to the window that the gesture was drawn in. It looks like you are using the keystrokes to create a new window (open the preferences), and then close the window created.

Your problem is that you're trying to use the keystrokes to close the preferences window, but that the keystrokes are again sent to the main window. This is the correct behavior for StrokeIt.

If you want the keys to be sent to the new window, you must first use the Activate Window command, probably with the "Wait for window to be created' option. This will switch focus to the preferences window, and all further processing (keystrokes, etc) will appropriately be sent to that window.

-- Jeff</HTML>
QM
Re: Focus changing before keys sent.
January 26, 2003 10:52PM
<HTML>Worked like a charm. Thanks. At first I was going to say "hey, didn't work," but I found that issuing a delay command after the activate window command apparently reset the focus so the hotkey once again was sent to the main window. Once I removed the delay, it worked great, aside from having to enter multiple keys since it misses the first unless I use a delay. You can see what I mean here- this is what I did:

Bug Workaround {
gesture = / Down - / Up
gesture = / Up - / Down
ALT-E = keys, hotkey [ALT_DOWN]E[ALT_UP]
300ms delay = utilities, Delay "200"
E = keys, hotkey E
Activate Prefs Window = win, activate "" "Preferences" ""
Esc = keys, keys [ESCAPE][ESCAPE]
}

Incidentally, I didn't see a "Wait for window to be created' option in the "Windows - Activate Window" section, unless the unlabeled checkbox at the bottom with a text entry is it. No matter though, it works. I will have to make a point to make a donation when I can (currently attending college with no job) for an extremely useful program. Thanks, Jeff.</HTML>
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 20 plus 18?
Message: