Page 1 of 2
Global keyboard shortcut to restore XYplorer from tray
Posted: 07 Feb 2009 22:47
by a1l0s2k9
My wish
I wish for the ability to assign a keyboard shortcut in XYplorer that will restore my XYplorer window that I have minimized to the tray.
Background
For programs that I use very frequently I prefer to keep them open all the time. Additionally, I prefer to minimize them to the tray because there always running, so there's no value (to me) in showing them in the taskbar. This arrangement means that my taskbar only shows the programs I'm working on
at the moment, which is great for me. In addition to XYplorer, other programs I use in this same way include X1, MediaMonkey, WinAmp, VirtuaWin, and Dexpot. All of these programs (except XYplorer) have the option of providing keyboard shortcuts that are truly global (they work regardless of which application is in focus), and this allows me to access these applications that normally live in the tray without having to use the mouse. It would be nice if XYplorer, too, had such a functionality.
Workaround
To workaround this need I've configured XYplorer to only allow a single instance, and I've modified a shortcut on my desktop to XYplorer to have a "Shortcut key". The net effect is that when I press "Ctrl + Alt + Y" explorer.exe runs "C:\Program Files (x86)\XYplorer\XYplorer.exe", which detects that it's configured to only allow one instance and that another instance is already running, so it brings the existing XYplorer window into focus.
Final comments
I have a workaround, though it's not ideal for three main reasons:
- It requires that I disable multi-window mode (this makes XYplorer a tad harder to use as an explorer.exe replacement, at least until the dual-pane functionality is built).
- It's not as easily portable to other systems as I'd like -- if XYplorer was configured to have a global shortcut, and it could automatically register itself the first time it was run, this would make it easier to transport my XYplorer configuration to other systems (i.e. eliminate the requirement that I create a windows shortcut and configure the keybinding there).
- It requires that my shell be explorer.exe, or a shell with functionality to bind keyboard shortcuts to start applications
Not the end of the world of course, just a nice-to-have. :) Thanks in advance for considering it!
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 07 Feb 2009 23:08
by jacky
I think this has been wished/discussed before, but has been turned down because XY is portable and this would require to mess with the registry.
(Unless what you're looking for is only a shortcut to restore an already running instance (i.e. not start a new one), and there's a possibility to do that without messing with the registry or anything, but I'm not sure that can be done -- or that Don would go for it.)
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 08 Feb 2009 01:14
by avsfan
I'm not an AutoHotKey wizard (but do use it occasionally -- actually, I only used it for updating XY before jacky's great scripts came along...), but this seems like something that AHK could do very well (and still keep the portability of XY...)
Or am I missing something? (other than it requires running an additional app...)
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 08 Feb 2009 02:36
by a1l0s2k9
Or am I missing something? (other than it requires running an additional app...)
No you're not missing anything. :) I'm a bit of an AutoIt wizard myself, so I know for sure it would be trivial to create an AutoIt script to do this. The problem is that it requires having another program running, which is arguably worse than relying on explorer.exe like I am now.
I think this has been wished/discussed before, but has been turned down because XY is portable and this would require to mess with the registry.
Then firstly, I should apologize...I did indeed search the forums but I guess my powers of search failed me. Sorry about that.
Regarding the portability, it's not clear to me why you'd have to modify the registry. I'm talking about a hotkey that restores into the foreground an already-running instance of XYplorer. I believe this would be as simple as calling
RegisterHotKey() and adding a message handler in XYplorer for the WM_HOTKEY event that simply restores (un-minimize) the window.
However, even if it did require modifying the registry I still don't see that as a problem, so long as the feature is optional and disabled by default. Agree/disagree?
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 08 Feb 2009 02:45
by jacky
a1l0s2k9 wrote:Regarding the portability, it's not clear to me why you'd have to modify the registry. I'm talking about a hotkey that restores into the foreground an already-running instance of XYplorer. I believe this would be as simple as calling
RegisterHotKey() and adding a message handler in XYplorer for the WM_HOTKEY event that simply restores (un-minimize) the window.
Yes, might be that the request had been for a global KS to even start a (first) instance of XY, which might then required to mess with Windows/registry. If it can be done without that, maybe there's a chance...
a1l0s2k9 wrote:However, even if it did require modifying the registry I still don't see that as a problem, so long as the feature is optional and disabled by default. Agree/disagree?
I think it's just a common rule that XY never messes with your system, not adding files (outside of its app/data/thumbs folders) nor modifying the registry in any ways, and Don likes to keep it that way. The only exception IIRC being on ConfigAdvanced: XY in shell ctxt menu. That's why you don't find an option to make XY the default file manager/associated with drives/folders...
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 08 Feb 2009 11:05
by PeterH
a1l0s2k9 wrote:However, even if it did require modifying the registry I still don't see that as a problem, so long as the feature is optional and disabled by default. Agree/disagree?
I really agree with this!
I think it's good that XY basically doesn't use registry. But if there's a function that can be useful, I think it should be supplied with XY and callable by user *at wish*.
Just my point of view.
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 08 Feb 2009 11:06
by admin
OK, looks like RegisterHotKey() does indeed work without altering the system permanently. But anyway, I don't want to put too much effort into this. So spare me the research and answer this: How is the configuration for such a hot key usually done? = Where/How does the user define WHICH key does WHAT?
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 08 Feb 2009 17:22
by TheQwerty
I posted the AHK script for this long ago...
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=2682
The Win+E hotkey should still work perfectly. I have an updated version at work that I've been meaning to upload, but it doesn't change that part of the code at all.
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 08 Feb 2009 21:17
by a1l0s2k9
Where/How does the user define WHICH key does WHAT
X1 does it by having a single configuration option that specifies the keyboard shortcut to restore the window. This is the only X1 hotkey that's global (i.e. this one hotkey is treated separately from all others), like this:
MediaMonkey does it by allowing any hotkey to be "global", based on a checkbox next to each keybinding, like this:
Either approach would work for me. Allowing any hotkeys to be global is clearly more flexible, but it's probably more work. If UDC's could be global, though, it might be handy for:
- Running a common report (no need to focus XYplorer first)
- Opening a common location (again, no need to focusing XYplorer first)
I believe either would address my wish nicely. :)
a1l0s2k9
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 09 Feb 2009 08:57
by admin
a1l0s2k9 wrote:Where/How does the user define WHICH key does WHAT
X1 does it by having a single configuration option that specifies the keyboard shortcut to restore the window. This is the only X1 hotkey that's global (i.e. this one hotkey is treated separately from all others), like this:
MediaMonkey does it by allowing any hotkey to be "global", based on a checkbox next to each keybinding, like this:
Either approach would work for me. Allowing any hotkeys to be global is clearly more flexible, but it's probably more work. If UDC's could be global, though, it might be handy for:
- Running a common report (no need to focus XYplorer first)
- Opening a common location (again, no need to focusing XYplorer first)
I believe either would address my wish nicely.
a1l0s2k9
Okay, thanks! I put it on my list, though it will not get a high prio.
Question: What happens if two apps register the same hotkey?
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 09 Feb 2009 13:31
by TheQwerty
admin wrote:Question: What happens if two apps register the same hotkey?
According to
MSDN:
RegisterHotKey fails if the keystrokes specified for the hot key have already been registered by another hot key.
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 09 Feb 2009 13:41
by admin
TheQwerty wrote:admin wrote:Question: What happens if two apps register the same hotkey?
According to
MSDN:
RegisterHotKey fails if the keystrokes specified for the hot key have already been registered by another hot key.
Thanks.
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 11 Feb 2009 09:52
by admin
Okay, I added it and I must say I like it.

On my system now, Win+X will restore/foreground XY.
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 11 Feb 2009 16:04
by j_c_hallgren
Is there some way to detrmine which "Win+" keys are already in use? It would appear that Win+X is free from your usage, but just made me wonder.
Re: Global keyboard shortcut to restore XYplorer from tray
Posted: 11 Feb 2009 16:45
by serendipity
admin wrote:Okay, I added it and I must say I like it.

On my system now, Win+X will restore/foreground XY.
I like it too

. I had to use Win+Z because my Win+X is bound to something else, but I dont care.