Creating a Dead Key

By creating our keyboard layout based on one that is close to what we want, we have only a little work to do. In this tutorial, we only need to define the three dead keys, and the keyboard layout will be complete.

We begin with the most complex of the three. In fact, none are particularly complex, with the only difference being the number of key combinations that need to be defined. For this, the dead key is the semicolon key, with no modifiers pressed.

The first step is to select “Create Dead Key…” from the Keyboard menu.

At this point, Ukelele asks you to press (on the keyboard) or click (in the keyboard window) the dead key. The thing to look for is the status bar at the bottom of the window.

Type the semicolon key, or click on the semicolon key in the window. This brings up a dialog that allows you to give a name to the new dead key state, or to make the dead key enter an existing dead key state.

Since there are already some dead keys in this keyboard layout, it is possible to choose an existing state. However, we want to create a new state, so we will stick with the default. Giving the dead key state a name is optional, and we will simply keep the default name, State 0 in this case.

Ukelele asks for a terminator for the new dead key state at this point, which we will leave blank, meaning that no output will be produced if the user types the dead key and then a key with no defined output in the dead key state.

At this point, Ukelele enters the new dead key state. Note that most keys now appear blank, indicating that they will produce no output in the dead key state.

Adding output to a dead key

Now that we are in the dead key state, we add the output that we want. We will start with the j key, which should produce Unicode code point U+014B, ŋ. There are several ways to do this. For this one, we will use drag and drop, using the Character Palette (also known as the Character Viewer in Mac OS X 10.6, Snow Leopard) as the source.

The Character Palette is provided by the system, and has to be activated in the International (Language & Text in 10.6) pane of System Preferences (find it in the list, and set the checkbox so that it is on). Once it has been activated, it will appear in the input menu, which normally has a flag, on the right side of the menu bar. Its appearance and organisation vary from version to version of OS X. This is the version in 10.5.8:

You can find the ŋ character in various ways, which depend on the version of OS X you are using. In 10.5, it is in the “Latin” part of the “European Scripts” section. Alternatively, you can just select “Roman” in the View popup at the top of the palette, and it will be in the “Accented Latin” section. Again, you could also find it by selecting “Code Tables” from the View popup, and working down to 014B.

Whatever way you get it, we now want to drag the ŋ to the j key in the main window. Click and hold the ŋ in the Character Palette, then drag it onto the main window. As it goes over keys that can accept a drag, the key will received the drag highlight, which lightens its colour.

When you are over the right key, release the mouse button, and you will see that the key now shows ŋ.

Having done the j key, we want to handle the a key, which produces ä. To show a different method of adding output, this time we will use the dialog box. To get it double-click the a key. The dialog box has a text entry box, and you can add the output in several ways. If you are using a US keyboard layout or similar, typing option-u a (⌥-u a) gets ä. Alternatively, you could find ä in the Character Palette, and then click Insert.

Click OK to dismiss the dialog, and you will now see that the output has been set to ä.

You can continue to add the output for the various keys using either method. In this way, all the output for the unshifted keys can be added, to get the following:

Now we need to turn to the uppercase characters. Again, we will start with the j key. The drag and drop method involves first pressing the shift key, and then dragging the Ŋ character onto the j key.

If you keep the shift key held down after you release the mouse, or press it again after releasing the mouse, you will see that the output of the j key with the shift key held down is set to Ŋ.

Another method of changing the output also uses the dialog created by double-clicking a key in the main window. This method uses the Unicode code point to enter the output for the key. We will set the output for the a key with shift using this method. Hold down the shift key and double-click the a key, making the dialog box appear. The code point we want is U+00C4, Ä. The way to enter this is to use the XML or HTML notation. Using hexadecimal numbers, the code point is entered as &#x00C4;.

There is some flexibility in this notation. The initial zeros can be omitted, and the letters can be upper case or lower case. Also, you can use decimal numbers by omitting the x, so that the same character can be entered as &#196;. Whatever method you choose, clicking OK will make the output Ä.

⬅ Previous Next ➡