Keyboard terminology

Most of this list has been written by Michael Kaplan for his Sorting It All Out blog.

Creating a shortcut? • How do I type? • Terminology
Sorting It All Out • MSKLC • keyboard-layout-editor.com

General terms

LCID — a locale identifier. Traditionally pronounced like "El-Sid". It is a value that has no real meaning at all to keyboards but some people who ought to know better seem to think it does. Those people are actually thinking of LANGID, another entry in the glossary. LCIDs are only 32 bits, a fact that sucks for reasons I'll talk about another day, but it's twice as much as keyboards use, anyway.

LANGID — a languge identifier. Traditionally not pronounced like "Lan-Gid", instead "Lang-Eye-Dee" is preferred. This is the bottom WORD of the DWORD that makes up an LCID and essentially represents a number that signifies a unique language/region/script combination. This combination is what is needed for keyboards, which are intended to be typical input methods for such combinations. Obviously, looking ahead to the world of custom cultures ans custom locales, this may not be the best design architecture. But it's a little too late to change now....

Layout ID — a layout identifier. This has no special pronunciation, probably because calling something a "Lid" would sound dumb. These numbers are used to help the USER SUBSYSTEM manage the situation when multiple keyboards use the same LANGID (something that happens for many keyboards that ship with Windows). Each keyboard layout using the same LANGID after the first must (1) have one and (2) it must not duplicate one that is already assigned on the system. Failure on either of these points will cause a layout to not be properly selected.

KLID — a keyboard layout identifier. Traditionally pronounced "Kay-El-Eye-Dee" because some people in the USA get very uptight about certain homonyms (you can catch me slipping on this point from time to time). It's also sometimes called the input locale identifier since the name for HKL has been updated (see the HKL definiteion for info on why that is incorrect since the HKL is for something different). The KLID can be retrieved for the currently selected keyboard layout in a thread through the GetKeyboardLayoutName API (note the pswzKLID parameter), though that is not true of any other selected or installed keyboard layout. Every keyboard layout on the system has one of these. Each KLID is 32 bits (thus 8 hex digits), and they can all be found in the registry as the subkeys under HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\. The bottom half of the KLID is a LANGID, and the top half is something device-specific. By convention, the first hex digit is usually as follows:

HKL — a handle to a keyboard layout, traditionally pronounced "Āch-Kay-El", the terminiology folks have pretty aggressively tried to call this an "input locale identifier" despite the obvious problem that it has nothing to do with locales and that it is not the same value as the actual identifier (the KLID). The HKL in actuality is the handle to an input method. Althought defined as a handle, only the lower 32 bits are currently used. Of those 32 bits, the bottom 16 bits represent a LANGID, and the top 16 bits represent a value defined by the USER SUBSYSTEM which helps to uniquely identify an installed keyboard layout. This is crucial since any keyboard layout can be installed more than once (by installing it under different languages, which helps user operations like spell checking).

MKLC — see MSKLC. The only people who call it MKLC are the ones who object to MSKLC since it's not a true acronym (Microsoft being a single word). None of the user interface or documentation calls it this, so it's unbelievable that it is getting such a large entry in this glossary, but people outside of Microsoft use it all the time.

MSKLC — the Microsoft Keyboard Layout Creator, traditionally prounounced "Em-Es-Kay-El-See" by people not taken in by the MKLC arguments. It is a tool released by Microsoft which allows someone to build a custom keyboard layout and build a setup package to install it on Windows NT 4.0, 2000, XP, or Server 2003. The help file contains a ton of information about the best way to design keyboard layouts that work well on Windows. I am the developer on it and love to hear feedback any time people have it, since there is always room for improvement.

IME — Input method editor, traditionally pronounced "Eye-Em-Eee". An IME is an engine that converts keystrokes into phonetic or ideographic characters. It is a commonly used abstraction that allows a keyboard with only 100 or so keystrokes to be able to support character sets that contain up to 20,000 or more ideographs. There are old samples in the Platform SDK using the Input Method Manager (IMM) APIs, but today most IMEs written by Microsoft use the much more approachable Text Services Framework.

Supported keyboard layout — this is an odd terminology that actually means a keyboard layout is defined on the system. It may not be currently selectable by a user (e.g., if it's a Thai keyboard layout and Thai/complex script support is not enabled). It can also be an IME or a speed-to-text converter, so DEFINED INPUT METHOD might have been a better term. This terminology is slowly being removed from documentation and it's not entirely clear what is replacing it.

Installed keyboard layout — another odd bit of terminology, it means a keyboard layout that a user has selected. It can also be an IME or a speed-to-text converter, so SELECTED INPUT METHOD might have been a better term. This terminology is slowly being removed from documentation and it's not entirely clear what is replacing it.

Scan code — The numeric value given to each physical key on a keyboard; the scan code is a hardware-dependent number that identifies the key. Scan codes have a fixed position on the physical keyboard, irregardless of the keyboard layout chosen by the user.

Virtual Key — Also called the VK, the code that is given by the Windows USER subsystem to represent a keystroke. It is mapped from a scan code by using the keyboard layout definition and is thus entirely dependent on the user's chosen layout. The reason for this is the [unfortunate, IMHO] choice to have e.g. VK_A to be used for the 'A' key, which meant that on keyboards that put 'A' in a different position the VK would have to be moved.

Keyboard features

Dead key — The dead key mechanism in keyboard layouts is rooted in European typewriters. One would type the accent character and the typewriter's head would not advance, then one would type the base character and it would. The term dead key refers to the fact that the position is not advanced after typing the diacritic mark. See Dead keys are not intuitive for more information.

Chained dead key — A dead key plus a base character will treat the combination as another dead key waiting for yet a third base character. One could then chain that as well, and so on — adding more and more keystrokes to produce in the end a single code point. See It is not easy to chain dead keys on Windows for more information.

Ligature — When a key outputs two or more UTF-16 codepoints. See Definitions are context sensitive fore more information, bearing in mind that there actually isn't limit of four UTF-16 code points only.

ShiftLock — CapsLock turned off when Shift is depressed. This option imitates traditional typewriter behavior where depressing the Shift key turns off CapsLock if it is active, something many users are accustomed to. See If SHIFTLOCK doesn't work for you, it's probably YOUR fault... for more information.

AltGr — Right Alt treated as Ctrl+Alt (also known as AltGr). This option makes the right Alt key equivalent to Ctrl+Alt, making it easier to reach keys in layouts in which the Ctrl+Alt Shift state is used extensively. The left Alt key is not affected by this setting. AltGr stands for Alternative Grafiken. See "To start press the ALTGR key." Hmm... where's the ALTGR key? for more information.

Key attributes

SGCAPS — Some keyboards do not associate the CapsLock and Shift keys together for all keystrokes; instead, pressing the CapsLock key defines an additional two shift states for specific keys. The "SG" in the name orginiates from the first keyboard layout to use the functionality, the Swiss German keyboard layout.

CAPLOK — CapsLock toggles the SHIFT state if no other state is on (i.e. CapsLock doesn't affect SHIFT state if Ctrl or Alt are down).

CAPLOKALTGR — CapsLock toggles the SHIFT state only if both Ctrl and Alt are down.

KANALOK — Kana Lock toggles the KANA state if no other state is on. KANALOK attributes only exist in Japanese keyboard layout, and only Japanese keyboard hardware can be KANA lock on state.