The Edit Key dialog box helps you assign a keysym to a key and adjust other key characteristics such as repeat, latch, and lock. You can open the dialog box by double-clicking a key on the Keyboard Editor window.

Edit Key Dialog Box

The dialog box consists of three areas: Key, State and Keysym. Each area is described in detail below.

Key

Shows the scancode, key, name, and keycode of the selected key.

State

You can set a lot of key characteristics such as repeat, latch, lock, and modifier in this area.

Repeat is the function that generates the same key events repeatedly while you are pressing the key. This function is turned on by default for most keys except for modifier keys such as Shift, Alt, and Control.

Latch is the function that generates only one of the KeyPress and KeyRelease event when a key is pressed and then released. So, you should press and release the key twice to generate both KeyPress and KeyRelease events. Usually this feature is used for CapsLock or NumLock keys.

Shift defines the key as a Shift key.

CapsLock defines the key as a CapsLock key.

Control defines the key as a Control key.

Mod1 ~ Mod5 defines the key as a modifier key such as Alt and ModeSwitch. Usually the Alt key is defined as a Mod1 modifier. In some cases, the NumLock key is defined as a Mod3 modifier.

Keysym

The Keysym area helps you assign Normal, Shift, ModeSwith, and Shift ModeSwitch keysyms for the selected key.

A keysym is a symbolic name that stands for a specific character and the name is mapped to a corresponding 32-bit value. For example, the "A" character is defined as "XK_A" and its value is "0x41".

To assign keysyms to a key, you should find an appropriate keysym from the search list in the dialog box. In the list, the preceding "XK_" string is omitted for convenience. You can find a keysym by name or by value. To find by name, enter the keysym name in the Keysym to find box. To find by value, enter the keysym value in the Value box and click Search. Once you find an appropriate keysym, it is highlighted in the list and you can set it as the keysym of the key.

If you want to define the Normal keysym, find an appropriate keysym from the keysym list, highlight the keysym in the list and then click the arrow button on the Normal box.

You can define four different keysyms for a key.

Normal is used when you press the key without pressing any other modifiers.

Shift is used when you press the key while pressing a Shift key.

ModeSwitch is used when you press the key while pressing a ModeSwitch key.

Shift M/S is used when you press the key while pressing both Shift and ModeSwitch keys.