<p>To the right, the Keymap window shows a representation of your keyboard. When you press a key, the corresponding key is darkened and the assigned symbol is entered into the <i>Sample and Clipboard</i> text field at the bottom. From there you can also copy and paste it into a document.<br/>
Thus, the Keymap preferences are not only for configuring your local keymap, but are also useful when looking for a special symbol used in other languages. For example, you can switch the keymap to "French", find the "ç" and copy it into your mail to François. (Though you'll find the "cedil" also in other keymaps...)</p>
<p>Pressing modifier keys like <spanclass="key">SHIFT</span>, <spanclass="key">CONTROL</span> or <spanclass="key">OPTION</span> changes the displayed keyboard accordingly.</p>
<p>Then there are the keys that are marked with a blue background. These keys are called <i>Dead Keys</i> that can change the key you press after that. If you click on such a blue key with your mouse, those changeable keys light up yellow. Click again and everything's back to normal. Examples are é, ñ, ó or ë.</p>
<p>Below the keyboard representation are two more options:</p>
<tr><td><spanclass="menu">Select dead keys</span></td><td></td><td>for setting the above mentioned blue keys.</td></tr>
<tr><tdclass="onelinetop"><spanclass="menu">Switch shortcut key...</span></td><td></td><td>for using the shortcut key in Windows/Linux mode, i.e. <spanclass="key">CONTROL</span> (normally <spanclass="key">CTRL</span>) or Haiku mode, i.e. <spanclass="key">COMMAND</span> (normally <spanclass="key">ALT</span>).</td></tr>
<p>The lists on the left offer the available pre-configured keymaps of the system, and below that, if available, user-defined maps. You can change a keymap in the keyboard representation: drag & drop one key on another and they switch places.</p>
<p>You can also create an individual mapping by drag & dropping a character from another app onto the key. For example, you could extend your regular keymap with often used currency symbols. Just click on the <spanclass="key">CONTROL</span> key and drag & drop the pound symbol from CharacterMap onto the 'P' key to get a ₤ when you press <spanclass="key">CTRL</span><spanclass="key">P</span>.
<br/>
By right-clicking a normal key, the context menu offers to <spanclass="menu">Remove</span> its mapping. Modifier keys can have alternative mappings, like using <spanclass="key">CAPSLOCK</span> as <spanclass="key">CTRL</span> key:</p>
<p>Alternatively to this or drag & dropping of keys, there's the menu <spanclass="menu">File | Set modifier keys...</span> that opens this window:</p>
<p>Here, you can assign keys to their respective roles or even completely disable the role of a key. You can even assign the same key to different roles, though that's not a good idea most of the time and you'll be warned by a small exclamation mark beside the pop-up menus if you do that.<br/>
Pressing <spanclass="button">Set modifier keys</span> applies your changes and closes the window.</p>
<p>When you're done you can save the result from the menu <spanclass="menu">File | Save...</span>. Your modified map will only appear in the user-defined list if it's stored in <spanclass="path">~/config/settings/Keymap/</span>. Otherwise you'll have to manually load it via <spanclass="menu">File | Open...</span>.</p>
<p>To better match the Keymap panel to your physical keyboard, there are several different settings available from the <spanclass="menu">Layout</span> menu.</p>
<p>The font used in the keyboard representation is set from the <spanclass="menu">Font</span> menu. Note, that it may or may not contain all symbols for a specific keymap.</p>
<p>Finally, there's a <spanclass="button">Revert</span> button to bring back the settings that were active when you started the Keymap preferences.</p>
<p>There's another method to customize your keymap besides the Keymap preference panel. It involves editing a text file containing loads of hex values, which may appear daunting on first sight, but isn't really that impossible to grasp.</p>
<p>You can dump the current keymap with a command in Terminal:</p>
At the beginning of that file, you'll find a legend of a stylized keyboard with the hex value corresponding to each key. Below that are the actual assignments of every value. You can do all the customizing that's also available from the Keymap preference panel, and then some. If you happen to have some special keys on your keyboard, you may be able to activate them. That is, use them as ordinary keys or like an option or control key. You won't be able to, for example, have your multimedia keys de/increase the volume or start some application. For this you can use the <ahref="shortcuts.html">Shortcuts</a> preferences.</p>
<p>This will produce a file <spanclass="cli">keymap.out</span> which you can load into Keymap via its <spanclass="menu">Open...</span> menu. By the way, the keymap command is able to load this binary format as well: <spanclass="cli">keymap -l < keymap.out</span></p>
<p>This is the dumped file (the rightmost keys of the stylized keyboard are cut-off for a nicer display on this page):</p>