This tutorial will show you how to find and list all currently assigned shortcut keys (hotkeys) in use by shortcuts for your account in Windows 10 and Windows 11.
A shortcut is a link to an item (such as a file, folder, or app) on your PC.
You can assign a shortcut key (aka: keyboard shortcut) to use to open a shortcut on your desktop, taskbar, and Start menu.
Here's How:
1 Download the ListHostKeys.zip file below originally from winhelponline on GitHub.
Download
2 Save the ListHostKeys.zip file to your desktop.
3 Unblock the ListHostKeys.zip file.
4 Extract (drag and drop) the ListHostKeys.vbs file from the ListHostKeys.zip file.
5 Run the ListHostKeys.vbs file.
The ListHostKeys.vbs file will not install anything on your computer.
(Contents of ListHostKeys.vbs file for reference)
Code:
'Script Info: Obtains the List of Shortcuts With a Hotkey assigned
'Author: Ramesh Srinivasan, for The Winhelponline Blog
'https://www.winhelponline.com/blog/list-all-hotkeys-used-shortcuts-script/
'Created on May 5 2016
'Modified on May 19 2016
'Reviewed on May 22 2021
'URL: https://www.winhelponline.com/blog
Option Explicit
Dim objFSO: Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim WshShell: Set WshShell = WScript.CreateObject("WScript.Shell")
Dim arrFolders, objFolder, fldr, colfiles, colFolders
Dim objFile, objSubFolder, oShellLink, strHotKey
arrFolders = Array ( _
WshShell.SpecialFolders("AllUsersDesktop") _
, WshShell.SpecialFolders("Desktop") _
, WshShell.SpecialFolders("AllUsersStartMenu") _
, WshShell.SpecialFolders("StartMenu") _
, WshShell.SpecialFolders("AppData") & _
"\Microsoft\Internet Explorer\Quick Launch" _
)
For Each fldr In arrFolders
If objFSO.FolderExists (fldr) Then Call GetHotKeys (fldr)
Next
Sub GetHotKeys (strFolder)
Set objFolder = objFSO.GetFolder(strFolder)
Set colFiles = objFolder.Files
For Each objFile In colFiles
If LCase(objFSO.GetExtensionName(objFile.Name)) = "lnk" Then
Set oShellLink = WshShell.CreateShortcut(objFile.Path)
If Trim(oShellLink.Hotkey) <> "" Then
strHotKey = strHotKey & "[" & Trim(oShellLink.Hotkey) & _
"]" & vbCrLf & objFile.Path & vbCrLf & vbCrLf
End If
End If
Next
Set colFolders = objFolder.SubFolders
For Each objSubFolder In colFolders
GetHotKeys(objSubFolder)
Next
End Sub
WshShell.PopUp strHotKey,,"Hotkeys Curently in Use by Shortcuts", 65
Set WshShell = Nothing
Set objFSO = Nothing
6 This script recursively searches for shortcuts in the Desktop and Start menu (per-user and per-machine locations), Quick Launch (W10 only), Taskbar – User Pinned & all of their subfolders, and shows the list of shortcuts with hotkey assignments in a popup window. (see screenshot below)
That's it,
Shawn Brink
Attachments
Last edited: