How do I find the shortcut that is using a specific keyboard shortcut?
I have created a Windows shortcut for launching Notepad, and I have added the shortcut key Ctrl+Alt+N. As a result, when I press Ctrl+Alt+N, Notepad starts up.
Now I'm working more and more with files, coming from UNIX machines, which Notepad does not display very well, so I would like to modify the behavior of the shortcut key into starting Notepad++.
This is very easy: just go to the Notepad shortcut, remove the shortcut key, create a new shortcut for Notepad++ and fill in the Ctrl+Alt+N key in there.
For your information, I have already tried creating a new shortcut (to Notepad++) and press Ctrl+Alt+N as the shortcut key, but when I do this, Notepad is started up :-)
The main question however is: I don't know where I have stored that shortcut. Does anybody know how to find a shortcut in Windows, based on the shortcut key?
Solution 1:
There are only a few possible locations for that shortcut:
- the desktop (%USERPROFILE%\Desktop, %PUBLIC%\Desktop)
- the start menu (%APPDATA%\Microsoft\Windows\Start Menu, %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu)
- the quick launch bar
(all user and system wide, of course)
Hotkeys will work only from these locations, so it shouldn't be too onerous to find the Notepad shortcut, provided it's named appropriately :)
Alternatively, pressing WIN
, then typing notepad
should list all shortcuts to notepad, certainly the ones windows will consider when searching for a hotkey.
Solution 2:
Based on the existing answer, this information about Pinned items, and this question about managing shortcut files with PowerShell, I put together this PowerShell snippet:
$sh = New-Object -ComObject WScript.Shell
ls -Path `
$Env:USERPROFILE\Desktop,
$Env:PUBLIC\Desktop,
$Env:APPDATA\Microsoft\Windows\"Start Menu",
$Env:ALLUSERSPROFILE\Microsoft\Windows\"Start Menu",
$Env:APPDATA\Microsoft\"Internet Explorer"\"Quick Launch" `
-Recurse -Force -Include *.lnk,*.url,*.pif |
Foreach-Object {
$link = $sh.CreateShortcut($_.FullName);
if ( $link.Hotkey ) { echo $link }
}
It searches for shortcuts in all the directories Windows will scan, and displays any with a non-empty "Hotkey" property. The last if
and echo
could easily be tweaked to find or display something more specific if you have lots of hotkeys assigned.