One copy

Support for xplorer² free lite version

Moderators: fgagnon, nikos, Site Mods

Zoltor
New Member
Posts: 4
Joined: 2004 Nov 30, 20:25
Location: Minsk, Belarus

One copy

Post by Zoltor »

Hello! Is it possible to launch only one copy of xplorer2 lite?
------
Ctrl+F4 shourtcut for tab closing doesn't work
Sorry for my english! =)
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

you always launch only one copy; all extra windows belong to the same process. But you can't limit x2 to a single window

i can't understand why ctrl+F4 doesn't work. Are you using a translated version of x2? do you have problems with other shortcuts too?
Zoltor
New Member
Posts: 4
Joined: 2004 Nov 30, 20:25
Location: Minsk, Belarus

Post by Zoltor »

you always launch only one copy; all extra windows belong to the same process. But you can't limit x2 to a single window
:( maybe this option will be include in next version? :roll:
i can't understand why ctrl+F4 doesn't work. Are you using a translated version of x2? do you have problems with other shortcuts too?
I'm using english version of x2.I haven't problems with other shortcuts only with Ctrl+F4
Sorry for my english! =)
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

can you close tabs using the Window menu item ?
Zoltor
New Member
Posts: 4
Joined: 2004 Nov 30, 20:25
Location: Minsk, Belarus

Post by Zoltor »

I can close active tab from menu (Window > Close tab) and from tab panel by clicking on [X] button
Sorry for my english! =)
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

i'm out of clues! :shrug:
i take it that both your <ctrl> and <f4> keys work
does ctrl+f4 work in other programs? eg in IE it should open the addressbar history
Zoltor
New Member
Posts: 4
Joined: 2004 Nov 30, 20:25
Location: Minsk, Belarus

Post by Zoltor »

damn!  :evil:  you right. Ctrl+F4 doesn't work anywhere! :(
Sorry for my english! =)
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Post by JRz »

Zoltor wrote:damn!  :evil:  you right. Ctrl+F4 doesn't work anywhere! :(
Maybe this key combination is 'hijacked' by some application you have installed? It can be difficult to find out which one though (especially if you have many apps installed).
Dumb questions are the ones that are never asked :turn:
JDN
Member
Member
Posts: 41
Joined: 2004 Nov 30, 05:27
Location: Toronto

Post by JDN »

Explorer hijacks some hotkeys. Most are documented but some are not. perhaps you might try looking in one of the TweakUI tools for your version of Windows.

Note that when people use the term "Explorer", some are referring to the apps Windows Explorer or Internet Explorer. But sometimes they are referring to the app that used to be called the File Manager. It is the app that controls the contents of the screen and manages the taskbar and related objects. It is this executable that registers the keys controlled by the registry key "NoWinKeys" that I will explain later in this post.

I've never experienced anything hijacking Ctrl-F4 and would guess that either that key is not being recognized at a very low level due to some problem with the hardware or the keyboard driver or some app has registered the hotkey. This is not very likely because if some malware wanted to hide the fact it was running, it would be fairly dimwitted for it to register such a popular key as Ctrl-F4. However, no one said that the authors of malware were all that bright.

Here is something you might like to try. But it is probably of more valuable as long-term knowledge than a likely fix for this specific problem concerning CTRL-F4.

The registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoWinKeys REG_DWORD 0x00000001

stops Explorer from hijacking the hotkeys defined with the Windows modifier. For example:

Win+D - Minimize all windows - toggle
Win+E - Windows Explorer
Win+F - Find tool
Win+L - Unlock computer
Win+M - Minimize all open windows
Win+Shift+M - Restore all open windows
Win+Break - system properties

FWIW, I prefered Win+D to Win+M because it acted as a toggle but I only used it briefly since I prefer to disable this half-hearted feature? (is this really a feature? it seems more like proof that MS implements things associated with hotkeys with terribly poor thinking) and choose to define my own hotkeys for my own purposes and dislike anyone interferring with that. For anyone using a hotkey manager, I would strongly recommend using XP (not W98) and using this registry key to stop Explorer from setting these hotkeys. Alternatively there are some excellent TweakUI programs that will handle this for you. But in all cases, you must reboot for the change to take effect.

Changing this NoWinKey registry key to "1" and then rebooting stops Explorer from registering these keys. Perhaps you should try it and see if it has any effect. Don't forget to reboot before trying to see if it has any effect.

Please note this registry key applys to XP - but not W98. I know of no way to stop W98 from registering these hotkeys. FYI - I listed all the key combos I know of that Explorer registers, but there may well be more).

P.S. These combinations mean pressing the Win key and holding it down while you press another key - so two keys are down at the same time.

It's true that pressing and releasing the Win key and then pressing "R" will display the Run dialog just as pressing them both together. But that is a fluke. These "winkeys" are about pressing two keys together - like Ctrl-F4.

One good way to test whether Ctrl-F4 is assigned is to try and assign it with a hotkey manager and see if it allows you to do that. If you can assign it to send the string <CTL F4>, that may solve your problem.

Win+L - Unlock computer
Last edited by JDN on 2004 Dec 05, 09:47, edited 5 times in total.
JDN
Member
Member
Posts: 41
Joined: 2004 Nov 30, 05:27
Location: Toronto

Hotkey Detective Application

Post by JDN »

Zoltor, if you want to find out who hijacked your Ctrl-F4, ...

Many years ago, when I first began my study of hotkeys, I found a free app that contained a lot of info about hotkeys and it supposedly listed all the hotkeys currenty in use on your system and showed which apps "owned" them. I use the term "own" because it is the closest thing that makes sense in this area. Although, making sense is not something that is often done in this area. Hotkeys are basically registered on a "first come - first served" basis.

Here is a quote from the author, himself (Gregory A. Wolking), that explains why I might say such a terrible thing about the way MS implemented their hotkeys in Explorer. I will tell you that I never worked in an area where I wasted more of my time owing to bad or missing documentation and conflicting opinions and information about the way hotkeys are implemented. It doesn't seem reasonable that such a seemingly simple thing should be so much trouble. But it was.

------------------------------------------------------------------

Windows 95 has support for hotkeys, but it's quirky at best, buggy at worst, and poorly documented. Hotkey Detective lists the hotkeys in use on your system, along with their associated shortcuts, and launches Explorer if you want to make changes. Thus it provides a mechanism for discovering and eliminating duplicate hotkeys, which can create problems on your system.

To install Hotkey Detective, simply copy it to your hard disk and create a shortcut for it. It does not have to be in your DOS PATH. When you run Hotkey Detective, it scans your Start Menu and Desktop folders and finds the hotkey assignments that Explorer stores in your.LNK and .PIF files. It presents a sorted list of all the hotkeys in use. Because the list is sorted by hotkey name, any items with duplicate assignments will be grouped together. If there are dupli-cates, Hotkey Detective displays a warning message beside the list and automatically selects the first duplicated key name.

------------------------------------------------------------------

I have placed a copy of Hotkey_Detective together with the source code and some writing by the author in one of my personal web spaces. I will leave it there for 7 days so that anyone who may wish to try this app may do so. I have to warn you though, I had a very bad reaction to this person's writing and to his app and I strongly disliked it. I had a very low level of confidence in it. Unfortunately, I can't remember why. It was many years ago.

So I warn you to use this app with the greatest caution. Perhaps you might profit from just reading what he has to say but not trying to execute the app itself. I do recall that much of what he had to say was very good but for some reason I strongly disliked a small part of it. I sure do wish I remember exactly what the problem was. I apologize for rambling about this without being able to give you the facts.

In any event, here it is. Good luck:

http://fire.prohosting.com/sylvest9/hk_det.zip

I would also like to suggest to Nikos that if he plans to go ahead with his work on hotkeys, it might be good for him to make a copy of this person's source code because it does many things necessary when working with hotkeys that would benefit any programmer about to begin a study of hotkeys.

Nikos, if you are interested in working with hotkeys, I should tell you that there are many freeware open source hotkey managers that have much more comprehensive and much better written code and, if you're interested, let me know and I'll give you some recommended good apps you can look at.
User avatar
nikos
Site Admin
Site Admin
Posts: 16296
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

sometimes explorer isn't the only culprit; other applications may use RegisterHotKey to hijack keys (e.g. your hotkey tool JDN!). Looks like we need a tool that will somehow penetrate the windows hotlist list -- wherever this may be stored!
JDN
Member
Member
Posts: 41
Joined: 2004 Nov 30, 05:27
Location: Toronto

Post by JDN »

It has been a very long time since I have looked at my Hotkey Manager source code or even thought about hotkeys, so I hope I remember most of the issues correctly. I'm feeling a little tired at the moment, so I may make a few posts during the next few days to try and explain a little about hotkeys.

Before discussing hotkeys, it's probably a good idea to discuss the distinction between accelerator keys and hotkeys. An app like X2 uses the key <Alt-B> to bring up the "Bookmarks" menu. It is called an "accelerator key" and not a "hotkey". The distinction is that an accelerator keys increases the speed with which you can open a menu because you only have to strike one key - usually the key which is underlined on a menu. But accelerator keys are limited to the single app in which they are used. Hotkeys are a system wide resource maintained by Windows and apply regardless of which app is in the foreground. Hotkeys work with any and every app. Accelerator keys only work with the app that defines them.

The technical details involved in registering hotkeys are not very complex. But there are a few things about it that make it rather messy. That is why the remarks I posted by Gregory A. Wolking seem so tongue in cheek. He is (I believe) having a laugh at the dreadful approach MS took to hotkeys when he says, "Windows 95 has support for hotkeys, but it's quirky at best, buggy at worst, and poorly documented."

After explaining how the thing works, I'll try to explain why people who understand this would have a good laugh at his tongue-in-cheek remarks.

The most important thing to remember about the approach to hotkeys is that it's done on a "first come - first served" basis. I don't believe the process of registering hotkeys necessarily has anything to do with the system registry. Some apps may use the registry to help them remember which hotkeys they defined. But there is no need for them to do that.

But any app that registers a hotkey can interfere with other apps. It all depends on who tries to register the hotkey first. Each app can query if their attempt to register the hotkey was successful or not. But trying to find out all the hotkeys that are currently in use and who registered each one seems like a very difficult thing to do. Gregory claims that his Hotkey Detective program does that, but I am skeptical. I recall studying his code and coming to the conclusion that the problem was a lot more complex than his code. So I don't believe his code works very well.

But, it's worth saying that using a global hotkey manager is not a big problem. Whoever registers a hotkey first has a lock on it until they either release it or terminate. But that is not really a problem.

If you are busy these days, I wonder if anyone other users of X2 would have an interest in collaborating with me on some techniques to use hotkeys that will enhance the operation of X2. The source code is large but not especially difficult. It is written in Delphi.

I would think that any successful version of a hotkey manager for X2 would benefit from some rewriting - though not much. There is a lot contained in the hotkey manager as it stands that is not really necessary to support X2 and I would think it reasonable to pare down the source code and produce a special version of the hotkey manager - especially for X2.

If anyone is interested, you would of course get a complete copy of the source code. This is not saying much since the project is mostly open source anyway. But if anyone has an interest in knowing more about how hotkeys work or has a vital interest in using X2 but would like to have more control over the hotkeys used by X2 ... I would invite you to download JDN Hotkeys and have a look at the source code. If you think it is something you could manage, I would be happy to work with someone in producing a version especially for X2. My interest in hotkeys is not really sufficiently keen to want to do this project all by myself. I'm also involved with some other projects at this time.

As for wanting a tool to penetrate the Windows hotkey list, Hotkey Detective is supposed to do that and I posted above a link to the executable, the source code and some remarks by the author. So you can try it and see if it works for you - or at least use his source code as a jumping off point.

But my recollection is that Hotkeys Detective falls short of its stated objective. So I'm not sure why you think HKD would be of any use to you, since if some app registers a hotkey before your app tries to register it, there is nothing you can do about it anyway.
dft1
Member
Member
Posts: 41
Joined: 2002 Jul 30, 14:13
Location: Atlanta GA US

Post by dft1 »

Another way to see hotkeys using x2 (pro) and windows scripting: http://forum.zabkat.com/viewtopic.php?t=2357
JDN
Member
Member
Posts: 41
Joined: 2004 Nov 30, 05:27
Location: Toronto

Post by JDN »

dft1 wrote:Another way to see hotkeys using x2 (pro) and windows scripting: http://forum.zabkat.com/viewtopic.php?t=2357
Your technique is very nice to see. It makes me happy whenever I see someone solve a problem by thinking "outside the box".

Nicely done.

The link you provide to get that freeware app (Hotkeys Detective) now requires people to buy a membership in order to download it and as I posted in some other thread, I always found that app to have some problems.

For people who cannot download that app from your link, here is a version that I posted on some of my web space:

http://fire.prohosting.com/sylvest9/hk_det.zip

But I do want to point out that your approach has the same problem as Mr. Wolking's "Hotkey Detective" app. It may be this problem that prompted Mr. Wolking to write: "Windows 95 has support for hotkeys,
but it's quirky at best, buggy at worst, and poorly documented."

It is in no way your fault. But, the way Explorer has implemented short-cut keys, you can only define them for apps that exist on the desktop or in the Start menu. There is no way to define them using Explorer for any other apps and there is no way to disable them either.

I explained in one of my posts yesterday about the difference between hotkeys and "accelerator keys". But Windows also makes a distinction between hotkeys and "short-cut keys".

One of the properties of an executable file is a "short-cut key". But the way it relates to the system-wide "hotkey" is complicated and because of the problems and restrictions with the way Windows has implemented them. It's really not worth explaining all the details behind the differences because of the limitations placed on 'short-cut keys" - they are just not worth taking much trouble to use them.

I should say that a system-wide hotkey as defined by an independent hotkey manager solves this restricition imposed by Explorer. A hotkey can be used to invoke any app - regardless of its location and one of the big reasons (IMO) why hotkeys have failed to gain the popularity they deserve is because of the many problems and restrictions imposed by Windows Explorer.

In particular, the only apps for which you can use Windows Explorer to define short-cut keys are those that exist on the desktop or in the Start Menu. This same restriction imposes some problems on your script since you would have to manually point and click on every folder that could contain an app for which you have defined a hotkey.

Sorry to seem to throw cold water on your script. I very much admire your innovative approach.