Copyright: Hotkeys Copyright © SheAr software


Hotkeys Helpindex
Hotkeys

Do you have a friend that has the Microsoft Intellitype software installed and now has easy access to a lot of common Windows 95 functionality through hotkeys? Now you can have the same and even more with ‘Hotkeys’.

‘Hotkeys’ is a program that allows you to define hotkeys to:

-	Start applications (like control panel applets or frequently used programs).

-	Send keystrokes to other applications.

-	Exit Windows, log off Windows or reboot your computer.

-	Quickly access some of Hotkeys internal functions like the Hotkey editor or the Hotkey list.

How To Use Hotkeys

Hotkeys program and source-code

Postcardware


How to use Hotkeys

Copy the Hotkeys program, the sample hotkey definition file (Hotkeys.hkd) and the Hotkeys helpfile (this file) to a directory somewhere on your hard disk and create a shortcut to the ‘Hotkeys’ program in your Startup folder. Now, every time you start Windows, the Hotkeys program is started as well. If you press a hotkey defined in the hotkey definition file, Hotkeys will perform the associated action (e.g. starting an application, sending keystrokes etc). You can see that Hotkeys works by looking at the tray-icon: an animation of a key being pressed is played every time you press a registered hotkey.

To edit the hotkey definitions, right click on the Hotkeys tray-icon and select Edit hotkeys from the popup-menu or press Win+H. This will bring up the Hotkey editor, where you can add, edit or delete hotkey definitions.

To view the Hotkey definitions, select View hotkey list from the popup-menu or press Win+V. The Hotkey list window displays all active hotkeys. To perform the action (like starting an application or sending keystrokes) associated with the hotkey double-click on an entry in the Hotkey list or select an entry with the arrow keys and press Enter.

The Hotkeys popup-menu also contains a list of the defined programs and their associated hotkeys under the Hotkeys menu item.


The Hotkeys program and source-code

Hotkeys was written entirely in Borland's Delphi (version 3.02) and comes with complete source-code. The source code demonstrates a lot of Win95/NT features like tray notification, animated icons, registering system global hotkeys etc. Most of this functionality is encapsulated in the following components:

AniIcons	Storage for animated icons

AniPlay	Animated icon player (used in Hotkeys about box)

AniTray	Animated tray-icon

SysHot	Component for registering and trapping hotkeys

You can find the source code in the following directories:

Source\	Source code for the Hotkeys program

Source\Components\	Source code for the component package

Source\Helpfile\	Source code for this helpfile

Source\Animations\	Icons and animation files used in the Hotkeys program

If you want to take a look at the Hotkeys source-code, make sure that you install the components first. Installing the components is easy:

If you use Delphi 3 select Install Packages from the Component menu. Click the Add button and select SheAr.dpl from the Source\Components directory.  For Delphi 2 select Install from the Components menu and install the files AniReg.pas and SysHot.pas.


PostcardWare

The Hotkeys program and the accompanying source-files are PostcardWare. This means that you’re completely free to use or modify it to suit your needs, with just a few restrictions:

•	The original copyright remains with the author of the software.

•	It is not allowed to sell this package as a whole pretending you wrote it or otherwise distribute it under your own name.

•	You are encouraged to distribute this package to anybody you like, but you have to give him or her the entire archive unmodified.

•	You’re not allowed to ask money for the distribution of this package.

•	If you use (portions of) the source-code in your own programs, you don’t have to mention my name in the credits or about-box. You do have a moral obligation to send me a postcard of your hometown however.

•	If you don’t use the source-code, but you like the Hotkeys program, you’re also encouraged to send me a postcard of your hometown.

Send those Postcards to:

SheAr software

Arjen Broeze

Gronausevoetpad 104

7511 BN  Enschede


The Hotkey Editor

The Hotkey editor lets you add, edit or delete hotkey definitions. When you are editing hotkeys and there are unsaved changes (the Apply button is enabled), all defined hotkeys are disabled. As soon as you press the Apply button or close the editor window the hotkeys are enabled again.

You can get more information on the hotkey editor by clicking on parts of the picture below:


The hotkey definition list shows the definitions of all programs and their associated hotkeys. To edit an existing definition, simply click on it. Every change you make to a new or existing hotkey definition is updated in the list immediately.  To save the changes you’ve made and activate new hotkeys, press the Apply or Close button.


Type the description for the program you want to run in this field. The description you type here is used in the Hotkeys menu-item in the tray-icon popup-menu.


Here you have to choose the action for this particular hotkey definition.  The following

actions are possible:

Execute Program	Starts the application specified in the ‘Command line’ edit box.

Send keystrokes	Sends the keys you typed in the ‘Keys to Send’ edit-box to the active
application. Click here for a list of special keys.

Exit Windows	Depending on the chosen parameter in the ‘Parameter’ combo-box, this
command will either shutdown or reboot Windows or log the current user off.

Display About Box	Displays the About window. This is the same as selecting ‘About’
from Hotkeys tray-icon popup-menu.

Edit Hotkeys	Displays the Hotkey editor.  This is the same as selecting ‘Edit
Hotkeys’ from the tray-icon popup-menu.

View Hotkeys	Displays the Hotkey list. This is the same as selecting ‘View Hotkey
list’ from the tray-icon popup-menu.

Hotkeys Help	Displays the contents topic of this Helpfile.


Depending on the chosen action above you can either specify the name of the program to run followed by possible parameters, or type the keys that have to be sent to another application, or select how to exit Windows in the ‘Parameters’ combo box.


Click this button to locate a program you want to associate with the defined hotkey. After you have clicked this button, locate and select the program to run in the standard dialog.


This is where you specify the hotkey for the selected application, set of keystrokes or command. Every time you make a change to a hotkey, the validity of that hotkey is checked because a system-wide hotkey can only be defined once. If some other program already registered the hotkey you’re trying to set, Hotkeys will inform you and reset the hotkey to it’s previous value.


Uncheck this box if you want to disable a particular hotkey, but would like to retain it in the list of hotkey definitions so you can reactivate it later. If you want to permanently remove a hotkey combination, use the Delete button.


This checkbox determines whether or not Hotkeys is accessible through the Windows 95/NT system tray. Check this box if you want to be able to quickly access the Hotkeys editor. If you uncheck the checkmark, the only way you can access the Hotkeys editor is by pressing the defined hotkey (default Win+H) or by starting the Hotkeys program (Hotkeys.exe).


Click this button to create a new hotkey definition. When you click the button, a new definition is created and all input fields are cleared. Although the new hotkey definition is added to the list, it will not become active until you press the Apply or Close button


Click this button to delete an existing hotkey definition. When you press the Delete button, the hotkey is removed from the list. However, the hotkey will remain active until you press the Apply or Close button.


When you click this button, all the changes you have made to the hotkey definitions are saved.


This button closes the Hotkey Editor. If you have unsaved changes, you will be prompted to save them before closing the Hotkey Edit.


The hotkey definition file initially contains the following definitions:

Description	Hotkey

Accessibility Properties	Win+A

Add/Remove Programs	Win+W

Control Panel	Win+C

Date/Time Properties	Win+T

Display Properties	Win+D

Edit Hotkeys	Win+H

Exit Windows	Ctrl+ Win+X

Fonts	Alt+Win+F

International Settings	Win+I

Keyboard Properties	Win+K

Modem Properties	Ctrl+Win+M

Mouse Properties	Alt+Win+M

Network Settings	Win+N

Password Properties	Ctrl+Win+P

Power Management	Alt+Win+P

Printers	Win+P

Reboot Windows	Ctrl+Win+R

System Properties	Win+S

View hotkey list	Win+V


If you like to send special characters as keystrokes, you’ll have to enclose them in curly braces. To send curly braces, enclose them in curly braces as well (eg. {{} sends the left curly brace). The following table defines the codes you can use to send these special characters:

Key	Code

Backspace	{BACKSPACE} or {BS} or {BKSP}

Clear	{CLEAR}

Caps Lock	{CAPSLOCK} or {CAPS}

Del	{DELETE} or {DEL}

Down Arrow	{DOWN}

End	{END}

Enter	{ENTER} or ~

Esc	{ESCAPE} or {ESC}

Help	{HELP}

Home	{HOME}

Ins	{INSERT} or {INS}

Left Arrow	{LEFT}

Num Lock	{NUMLOCK}

Page Down	{PAGEDOWN} or {PGDN}

Page Up	{PAGEUP} or {PGUP}

Right Arrow	{RIGHT}

Scroll Lock	{SCROLLLOCK} or {SCROLL}

Tab	{TAB}

Up Arrow	{UP}

F1	{F1}

F2	{F2}

F3	{F3}

F4	{F4}

F5	{F5}

F6	{F6}

F7	{F7}

F8	{F8}

F9	{F9}

F10	{F10}

F11	{F11}

F12	{F12}

To specify keys combined with any combination of Shift, Ctrl, and Alt keys, precede the regular key code with one or more of the following codes:

Key	Code

Shift	+

Control	^

Alt	%