KeyboardLayoutFlags Enumeration

Specifies how the input locale identifier is to be loaded when calling LoadKeyboardLayout(String, KeyboardLayoutFlags) function.

Definition

Namespace: DevCase.Win32.Enums
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[FlagsAttribute]
public enum KeyboardLayoutFlags

Remarks

Members

Activate 1 If the specified input locale identifier is not already loaded, the function loads and activates the input locale identifier for the system.
SubstituteOk 2 Substitutes the specified input locale identifier with another locale preferred by the user.

The system starts with this flag set, and it is recommended that your application always use this flag.

The substitution occurs only if the registry key HKEY_CURRENT_USER\Keyboard\Layout\Substitutes explicitly defines a substitution locale.

For example, if the key includes the value name "00000409" with value "00010409", loading the U.S. English layout ("00000409") causes the Dvorak U.S. English layout ("00010409") to be loaded instead.

The system uses KLF_SUBSTITUTE_OK when booting, and it is recommended that all applications use this value when loading input locale identifiers to ensure that the user's preference is selected.

Reorder 8 Moves the specified input locale identifier to the head of the input locale identifier list, making that locale identifier the active locale identifier for the system.

This value reorders the input locale identifier list even if Activate is not provided.

ReplaceLang 16 If the new input locale identifier has the same language identifier as a current input locale identifier, the new input locale identifier replaces the current one as the input locale identifier for that language.

If this value is not provided and the input locale identifiers have the same language identifiers, the current input locale identifier is not replaced and the function returns NULL.

NoTellShell 128 In this scenario, the last input locale identifier is set for the entire system.
SetForProcess 256 This flag is not used.

LoadKeyboardLayout(String, KeyboardLayoutFlags) always activates an input locale identifier for the entire system if the current process owns the window with keyboard focus.

ShiftLock 65,536 This is used with Reset. See Reset for an explanation.
Reset 1,073,741,824 If this flag is set but ShiftLock is not set, the Caps Lock state is turned off by pressing the Caps Lock key again.

If this flag is set and ShiftLock is also set, the Caps Lock state is turned off by pressing either SHIFT key.

These two methods are mutually exclusive, and the setting persists as part of the User's profile in the registry.

See Also