Partager via


Input Languages (Windows Embedded CE 6.0)

1/6/2010

Unlike the device layout, the input language is not hardware-specific. The input language contains the virtual-key code to Unicode translations and virtual-key code to XT scan code translations. The Remote Desktop Protocol (RDP) requires the virtual-key code to XT scan code mapping. For more information, see Remote Desktop Protocol Support.

The low word of an input locale identifies an input language.

InputLang.h describes the complex relationship between the modifier keys and the virtual-key code to Unicode conversion. Layout Manager maps the current modifier keys, such as SHIFT, CTRL, and so on, to an index into the virtual-key code to Unicode tables. Then, it searches the tables for the virtual key and uses the index of the modifier keys to determine its Unicode value.

The following code example shows the input language data structures; these are declared in InputLang.h.

typedef struct _INPUT_LANGUAGE {
  DWORD dwSize;
  DWORD dwType;
  DWORD dwSubType;

  // Modifier keys
  const MODIFIERS *pCharModifiers;

  // Optional shift key table
  const VK_TO_SHIFT *pVkToShiftState;

  // Optional toggle key table
  const VK_TO_SHIFT *pVkToToggledState;

  // Virtual key to Unicode
  const VK_TO_WCHAR_TABLE *pVkToWcharTable;//ptr to tbl of ptrs to tbl

  // Dead keys
  const DEADKEY *pDeadKey;

  // Virtual key to XT scan code
  const VKEY_TO_SCANCODE *pVkToScanCodeTable;

  // Locale-specific special processing    
  DWORD fLocaleFlags;

  // Ligatures (Not currently supported. Here for compatibility only.)
  BYTE nLgMax;
  BYTE cbLgEntry;
  const LIGATURE1 *pLigature;

  BYTE bcFnKeys;
} INPUT_LANGUAGE, *PINPUT_LANGUAGE;

typedef BOOL (*PFN_INPUT_LANGUAGE_ENTRY)(PINPUT_LANGUAGE pInputLanguage);

See Also

Concepts

Layout Manager
Input Language Data
Keyboard Identification