# Key bindings

One of Alpha's features is that you can define a key binding for almost everything. In HTML mode and CSS mode there is an easy way to add key bindings to the menu items and to change or remove the existing key bindings.

To modify the key bindings in the menus choose 'Key Bindings...' in the HTML Utilities menu. You are first presented with a list where you pick the menu you want to redefine. Let's for example choose the menu 'Blocks and Dividers'.

First a window is opened, as shown above, with the current key bindings.

Beside each menu item, or pair of menu items for dynamic ones, is a button 'Set...'. Clicking such a button opens another window where you can change the binding. For example, clicking 'Set...' beside 'Block Quote' opens the window

For dynamic items the checkbox for option is absent. Option is always used to toggle between the two items of the dynamic menu item and doesn't have to be selected explicitly.

To define a binding either select 'Normal key' in the popup menu and type a character in the text box, or choose one of the special keys in the popup menu. Then choose which of the modifiers shift, ctrl, option, and command you want.

To remove a binding either select <No binding> in the popup menu or select 'Normal key' and clear the textbox.

Tip: To find out if a certain key combination already is used for anything, type F7 and then the key combination. An alert then shows which the bindings is. If you want a list of all bindings defined, use Config -> Global -> List All Bindings.

## Key bindings for character entities

It is also possible to define key bindings for the character entities found in the submenus of the 'Character entities' menu. These bindings are not displayed in the menu. The advantage with this is that you can bind the entities to any key you like including accented characters. By default the following bindings are defined:

shift-ctrl-opt-, | inserts &lt;
shift-ctrl-opt-. | inserts &gt;
shift-ctrl-opt-7 | inserts &amp;
shift-ctrl-opt-space | inserts &nbsp;

## Command-double-click

Command-double-clicking on an opening tag lets you change the attributes of the tag. This is equivalent of using 'Change container/Change opening' in the Editing menu. However, clicking on a color or URL attribute has a special effect, see below.

Command-double-clicking on a color attribute brings up a color picker where you can change the color.

Command-double-clicking on an include tag opens the file.

Command-double-clicking on an absolute URL sends the URL to your web browser. This is not limited to HTML mode. It is a general feature of Alpha.

Very annoying bug: If there is a colon close to where you click, Alpha thinks it's a URL and sends it to Internet Config. When this happens HTML mode never gets a chance to react to your click.

Command-double-clicking on a relative URL attribute opens a new window with the file if the file exists and is a text file. If it does not exist, a dialog box appears as the one shown below. As you see, a new empty window can be opened with the name of the file. This window is automatically saved in the right place, and if necessary new folders are created. Thus, if you are making a new set of pages, you can make links to the ones you have not written yet and then, by cmd-double-clicking, let Alpha make empty files which are saved where you want them.

Command-double-clicking on a CSS URL property has the same effect.

Command-double-clicking on an anchor link <A HREF="#anchor"> jumps to the corresponding <A NAME="anchor"> in the file.

If the URL you click on points to a non-text file like an image, the file is opened in the application it was created with. If you don't want to open non-text files this way you can disabled this feature by unchecking 'Cmd-double-clicking on non-text file link opens file' in the general preferences dialog.