Keyboard shortcut won't work for shortcuts in USER/Links folder - Windows 8.1
Solution 1
Tests
Shortcut Replacement
I ran some tests and got some interesting and very telling results. I did the test in Windows ME (it was the earliest version of Windows I had a running copy of on hand at the time), and repeated it with XP and then 7. This is what I did, which you can repeat:
- Create a shortcut to the calculator on the desktop, name it
C
and assign it an unused hotkey - Test that the hotkey work
- Create a shortcut to Notepad in the
Links
folder, name itN
, and assign it a different, unused hotkey - Confirm that the hotkey does not work
- Delete the shortcut to the calculator from the desktop
- Move the shortcut to Notepad from the
Link
folder to the desktop and rename it toC
- Press hotkey that was assigned to the original shortcut to the calcuator
- Note that it runs Notepad
This occurs on Windows ME and XP, but in Windows 7, pressing the either hotkey did nothing at the end.
Internal Hotkey Format
From this, we can assume that when you assign a hotkey to a shortcut, it assigns it to the full path to the shortcut. For example, in the test above, setting the hotkey Alt+⇧Shift+C to the calculator shortcut would cause Windows to register something like this internally:
C A S W K P
- + + - C "C:\…\Foobar\Desktop\C.lnk"
Therefore, if you delete (or move or rename) the shortcut, pressing the key will try to run the shortcut that does not exist. Curiously, if you monitor file-access in Process Explorer, you will not see FILE NOT FOUND
errors trying to access the missing shortcut, but if you restore the shortcut, you will see it being accessed again when you press the hotkey.
Automatic Hotkey Managment
Also, that Windows 7 does not run the copied shortcut seems to indicate that Explorer does some sort of hotkey-management whenever shortcuts are moved, renamed, or deleted, but of course, there are limitations to what it can do. (For example, if two shortcuts share a hotkey, deleting the one that has the hotkey will not suddenly re-assign the hotkey to the other one, you need to manually open that shortcut’s Properties dialog and click [OK]
to do that.)
Links-folder Redirection
I then considered redirecting the Links
folder (figure 1). I tried redirecting it, then copying the moved folder back to the original location. I found that hotkeys did not work for shortcuts in either folder. I then tried stripping the attributes from from the folders and even deleting the desktop.ini
files from them under the assumption that Windows treats them specially, but that did not help. I then created a new, regular folder in the user-data folder and to my surprise, hotkeys still wouldn’t work.
Shortcut Hotkeys All Around the File-System
Next, I tried it with a shortcut on a different drive, and still nothing. I tried assigning hotkeys to shortcuts in several different locations in Windows 7, and only the shortcuts that were in the Desktop
or Start Menu
folders or one of their sub-directories could use hotkeys.
Conclusions
It seems that Explorer’s hotkey function for shortcuts is extremely limited and only works for the Start Menu and desktop. I don’t know if this is a bug or intended because I cannot find any mention of the limitation. Microsoft’s own page on the subject says nothing about it. (Let them know through the feedback form. I clicked [No]
and submitted a link to this page.) There’s no reason to believe that this is different in Windows 8 or 8.1 or possibly even future versions (assuming that they retain Explorer at all).
Recommendations
You could (attempt to) report it, but I wouldn’t hold out hope of it being fixed. It would be faster and easier to just store shortcuts that need hotkeys in another folder.
Figure 1: Links-location setting:
Solution 2
I recently asked a similar question, and I've figured out the answer, so I guess I'the answer here. My question was more about the internal function of Windows' shortcut hotkey management and the whats and hows. Can you add folders to the list? Are there any less known folders where you can put shortcuts with hotkeys? In the end, I just confirmed what was already known, but here's how I did it.
My first attempt at figuring it out was looking at Procmon traces of explorer.exe
. Procmon is a utility which traces file and registry access, and my conclusion was that the process didn't seem to look for any additional paths in the registry.
Not completely satisfied, I remembered that there was a Windows 2000 source code leak some 10 years ago. I tracked that down and looked at the logic in that code. It turns out that hotkeys for shortcuts are managed in two places.
-
When altering the properties of a shortcut. When pressing OK or apply in the properties dialog for a shortcut, the Windows checks if the shortcut's folder is, or is a subfolder of, a fixed list of folders. This list is
CSIDL_PROGRAMS
,CSIDL_COMMON_PROGRAMS
,CSIDL_STARTMENU
,CSIDL_COMMON_STARTMENU
,CSIDL_DESKTOPDIRECTORY
,CSIDL_COMMON_DESKTOPDIRECTORY
as given in CSIDL notation. (Each CSIDL item is eventually looked up against a registry value, unless perhaps cached somewhere. I didn't look up the implementation details of that.) If the shortcut is in one of those locations, a hotkey is registered, and if applicable, the old hotkey is wiped. -
When
explorer.exe
starts. In a different part of the code, all start menu items, as well as all desktop items are enumerated when theexplorer.exe
process first starts. The enumeration of those two different paths are done in different functions. The function enumerating items in the start menu folder is recursive, and this function is also handling caching of icons. The function enumerating items on the desktop is not recursive, but only checks the desktop folder itself.
No attempt is made to handle moving or deleting a shortcut.
This explains certain odd behaviors, such as the following:
- When you move or delete a shortcut from a valid location, the hotkey remains in memory, and pressing it will blindly try to run the now non-existent shortcut. (For as long as the current
explorer.exe
process lives.) - Likewise, if you move a shortcut with a hotkey into a valid folder, this will not be discovered until the next session, or until you edit the properties of the shortcut.
- If you create a shortcut in a subfolder to the desktop, it will work for the current
explorer.exe
session, since pressing OK/apply adds the hotkey according to mechanism 1 above. However, in the next session, this hotkey will not be added, as the shortcut is in a subfolder, whichexplorer.exe
doesn't recurse into when the process first starts.
In the end, I mostly confirmed what was known, but it feels good knowing why.
Related videos on Youtube
Comments
-
Varaquilex over 1 year
I have been using keyboard shortcuts for some folders back in Windows 7. Lately I started using Windows 8, now using Windows 8.1.
There seems to be an issue about keyboard shortcuts in
C:\Users\username\Links
folder. I assign the shortcut, but it won't work. Any other shortcut for any folder, however, works just fine. I can't use keyboard shortcut just for the ones inLinks
folder.How to fix this issue?
Edit
I tried a few workarounds but they did not work:
I cut the shortcut from the Links folder, pasted it on Desktop. Same keyboard shortcut did not work. I changed the keyboard shortcut to something else, (by the way I'm sure the keyboard shortcuts are not assigned to something else) and it worked with a different keyboard shortcut. I moved it back in the Links folder, It did not work. I, again, changed the shortcut to something else. I thought it would work this time but even though the shortcut is moved back into Links folder and re-assigned a different keyboard-shortcut, it did not work.
-
Synetech over 10 yearsI assume you have tested by moving the shortcut to another folder and checking that it works and moving another shortcut that works to the Links folder and confirming that it stops working, as well as trying different hotkey combinations to make sure it’s not just a hotkey that is already used correct?
-
Varaquilex over 10 yearsI cut the shortcut from the Links folder, pasted it on Desktop. Same keyboard shortcut did not work. I changed the keyboard shortcut to something else, (btw im sure the keyboard shortcuts are not assigned to something else) and it worked with a different keyboard shortcut. I moved it back in the Links folder, It did not work.
-
Varaquilex over 10 yearsI reset the shortcut key after moving it back in Links folder. Still not working. You are correct about the necessity of the re-assignment after moving the shortcut. You have to re-assign (a different keyboard shortcut, and after applying, you have to assign the original keyboard shortcut back) the keyboard shortcut for it to work again.
-
Synetech over 10 yearsUnfortunately, it seems that your title is simply correct; for some reason, hotkeys of shortcuts in the
Links
folder just don’t work (and not just in Windows 8.1, but all versions). Strange. If it’s a bug, I wonder where in the code it could be, or if it’s on purpose, why the heck they would have chosen to do that. TheLinks
folder was created way back in IE4 with the MSN add-ons to Windows 95, so maybe it has something to do with being a Favorites folder (i.e., browser bookmarks don’t/shouldn’t get system hotkeys). -
Varaquilex over 10 yearsThe strange thing is I recall using them back in Win7 just fine. They did work for the shortcuts in Links folder. This is really dumb:)
-
Synetech over 10 yearsI tested it in Windows 7 and it doesn’t work. Maybe what you are remembering was a folder that happened to be named
Links
but was different from the one that Windows uses for the “links-folder”, or maybe you had your links-folder configured to point somewhere else, so the originalLinks
folder worked while the other wouldn’t have. I’ll test it in Windows XP tomorrow, but I suspect it won’t work there either. -
Varaquilex over 10 yearsYou may be correct, it was a while ago. Perhaps I changed some locations. I'm waiting to hear the XP news.
-
Synetech over 10 yearsActually, I forgot that I have VMs with Windows ME and XP on hand, so I just did a test and sure enough, it doesn’t work from that one, specific folder in ME or XP. In addition, I did some tests that seem to indicate that the hotkey is mapped to the path and filename of the shortcut, which likely means that the code in Windows that handles running shortcuts from hotkeys either specifically ignores shortcuts in the
Links
folder on purpose, or it does so due to a bug (possibly due to unexpected string function results). -
Varaquilex over 10 years@Synetech please feel free to answer the question, you have done research and came up with a conclusive result. This should be an appropriate closure for the question.
-
-
Synetech over 10 yearsNow to set everything back the way it was…
-
Varaquilex over 10 yearsHaha, thank you for the trouble:) This is an interesting case if you ask me... And a very comprehensive answer. I, too, think it's not worth submitting any forms to microsoft. I'd better re-arrange things.
-
Synetech over 10 yearsYes, unfortunately that have almost as bad a reputation as Google for ignoring user feedback.
:-/
-
Varaquilex over 10 yearsBounty incoming in 24h for your efforts.
-
Synetech over 10 yearsThanks. Sorry I couldn’t find a fix. For what it’s worth, there are plenty of quick-access methods for running things easily. For example, you can run an AutoHotkey in the background which is set up to run any program you want at the press of a hotkey, e.g.,
#C::Run calc.exe
will let you launch the calculator withWin
+C
. -
DrMoishe Pippik almost 7 yearsSince my last Windows 10 update, all my links keyboard shortcuts were broken. As @Syntech suggests, the only way I found to resolve the issue was a third-party shortcut manager, e.g. Clavier+, utilfr42.free.fr/util/Clavier.php (which makes it easier to manage all the shortcuts in one place, too).