whut / jumplist-extender

Automatically exported from code.google.com/p/jumplist-extender
0 stars 0 forks source link

Allow sending keystrokes without (visually) giving focus to window #66

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What I want, basically, is the option to send keystrokes to a program without 
giving it focus. So for example, Foobar is minimized and I want to send a "Stop 
playback" command... naturally, bringing Foobar to the foreground would be 
unnecessary, as my next step would be minimizing  Foobar again.

Out of the top of my head, applications that could really benefit from this are 
media players (particularly when playing music, if the music player is in the 
background) and various tweaking tools (when the user does not feel like giving 
focus to the program and fiddling with the UI just to change a setting).

I'm not sure how feasible this is to implement, but I think it could prove very 
useful.

Original issue reported on code.google.com by Picky...@gmail.com on 27 Aug 2010 at 2:28

GoogleCodeExporter commented 8 years ago
Yep, this is possible and pretty easy to do.

Instead of Send, I could use ControlSend or PostMessage. Some programs will 
work with this and some programs won't; maybe I could allow selecting the 
control, instead of the window...?

http://www.autohotkey.com/docs/commands/PostMessage.htm - e.g. pass 0x111 to 
Wordpad to enable word wrap. Would be nice to let users select actually menus 
instead of having to deal with keyboard shortcuts, but takes more work to 
implement.

http://www.autohotkey.com/docs/commands/ControlSend.htm - Much easier; 
essentially "Send", but able to specify any window, active or inactive. Less 
reliable, however.

http://www.autohotkey.com/forum/topic15498.html

Original comment by mar.mar...@gmail.com on 27 Mar 2011 at 11:19

GoogleCodeExporter commented 8 years ago

Original comment by mar.mar...@gmail.com on 27 Mar 2011 at 11:36

GoogleCodeExporter commented 8 years ago

Original comment by mar.mar...@gmail.com on 27 Mar 2011 at 11:38

GoogleCodeExporter commented 8 years ago

Original comment by mar.mar...@gmail.com on 27 Mar 2011 at 11:46

GoogleCodeExporter commented 8 years ago
Implemented! There are two options to use:

1. "Send in background" sends keyboard shortcuts to a minimized or deactivated 
window. Sometimes works, sometimes doesn't, depending on the program.

2. "Minimize/deactivate" is for those programs where the first option doesn't 
work. First, it brings the window to the foreground, and then it 
minimizes/deactivates the window afterward (if it wasn't in the foreground 
before).

Original comment by mar.mar...@gmail.com on 31 Mar 2011 at 8:21