# Canonical Key Types

## Canonical Key Types

### The ONE_LEVEL Key Type

The ONE_LEVEL key type describes groups that have only one symbol. The default ONE_LEVEL type has no map entries and does not pay attention to any modifiers.

### The TWO_LEVEL Key Type

The TWO_LEVEL key type describes groups that have two symbols but are neither alphabetic nor numeric keypad keys. The default TWO_LEVEL type uses only the Shift modifier. It returns level two if Shift is set, level one if it is not.

### The ALPHABETIC Key Type

The ALPHABETIC key type describes groups that consist of two symbols — the lowercase form of a symbol followed by the uppercase form of the same symbol. The default ALPHABETIC type implements locale-sensitive "shift cancels caps lock" behavior using both the Shift and Lock modifiers as follows:

- If Shift and Lock are both set, the default ALPHABETIC type yields level one.

- If Shift alone is set, it yields level two.

- If Lock alone is set, it yields level one but preserves the Lock modifier.

- If neither Shift nor Lock are set, it yields level one.

### The KEYPAD Key Type

The KEYPAD key type describes that consist of two symbols, at least one of which is a numeric keypad symbol. The default KEYPAD type implements "shift cancels numeric lock" behavior using the Shift modifier and the real modifier bound to the virtual modifier named "NumLock" (the "NumLock" modifier) as follows:

- If Shift and the "NumLock" modifier are both set, the default KEYPAD type yields level one.

- If either Shift or the "NumLock" modifier alone are set, it yields level two.

- If neither Shift nor the "NumLock" modifier are set, it yields level one.