Shortcut keys (Hotkeys)
Shortcut keys (also known as hotkeys) are poorly documented in Windows 95, but are very useful when used creatively. To create one, you need a shortcut file, that is, a .lnk or .pif file. This shortcut can point to any folder or file, however Windows will use a shortcut key only if the associated shortcut is located on the Desktop or in the Start Menu folder tree. Furthermore, experimenting has shown that the shortcut must not be marked Hidden, nor located in a Hidden folder.
This shortcut could point to an executable, such as a Windows .exe or a DOS .exe, .com, or .bat file. (You cannot create a shortcut key for a DOS program configured to run in MS-DOS mode). It is often more useful, however, to create a shortcut key (with corresponding shortcut) to launch a document. Note that the document type must be registered, that is, the document extension is associated with an application. For more info about file types, see File Types.
To overcome Explorer's Find: Files and Folders limitation of not having an 'All Hard Drives' choice in the 'Look in' field, I wrote a short Dos2Win script to send the string 'C:\;D:\;E:\;F:\' to the Find window. Then I created a new folder under Start Menu/Programs/Accessories called 'Hot Keys'. In this folder I made a sortcut to the script file, and assigned it the shortcut key combination Ctrl+Alt+A. Now, when I'm using the Find applet I can type a filespec to find and then press Ctrl+Alt+A to have my script run and automatically move the cursor to the 'Look in' field and enter the string for me! (See the note below for the text of the Dos2Win script that acomplishes this).
To define the shortcut key (hotkey) for a shortcut, right-click the shortcut and select Properties. Now click the Shortcut tab for a .lnk file, or the Program tab for a .pif file. Click in the field labeled 'Shortcut key'. Press a key combination to define the shortcut key. The rules are again different for .lnk and .pif files. For .lnk files, Explorer forces the modifiers Ctrl and Alt. For .pif files, use any key combination as long as it contains one of the modifiers Shift, Ctrl or Alt. Remember that any key combination assigned as a shortcut key is no longer available to ANY other program, including Explorer. Keys which cannot be used are Space, Enter, Backspace, Tab, Esc, Pause and PrintScreen. Keys which should be avoided include key combinations used by Windows and common applications, as well as combinations using the NumLock, ScrollLock and CapsLock keys.
To remove a shortcut key setting, activate the 'Shortcut key' field and press Backspace, Del or Space. Note that Explorer often has difficulty updating its internal table of shortcut keys, so you may have to restart your computer before the changes take effect. This is important to remember considering that Explorer also will NOT prevent you from assigning the same key combination as the shortcut key for more than one shortcut. To avoid strange behavior, remove the shortcut key from one shortcut and restart the computer before assigning the same key combination to another shortcut. Also, it helps to keep a list if you assign many shortcut keys, so you can be sure not to use the same key combination over again. Note that in general it is a good idea to avoid Alt-key combos because they are heavily used by Windows and Windows programs. Instead, use Ctrl, Ctrl+Alt, Shift+Ctrl, or Shift+Alt combos.
NOTE: The Dos2Win script used above is as follows:
ACTIVATE=Find: All Files (makes the Find applet the active window) KEYS=%L (Alt-L moves to the 'Look in' edit field) KEYS=C:\;D:\;E:\;F:\ (types in the desired search path)