Akakus

KeyboardLayout  1.1

Khaled Shagrouni , January 23, 2003

Delphi Papers
Delphi Papers

 

Download
KeyboardLayout

 

 

 

 

 

 

 

 

 (Free with source)

Description

  • Use KeyboardLayout to manage system locales keyboard layout.
  • Set the cutrrent input language in different ways.
  • Retrive different names of the active syasem locales.
  • Detect the current input language when its changes.

 

Installation

  • A. Unzip the files:
     - KeyboardLayoutReg.pas
     - KeyboardLayout.pas
     - KeyboardLayout.dcr
     - pkDKeyboardLayout.dpk
     Into the same directory.
  • B. From Delphi menu, Select File| Open: and select the file pkDKeyboardLayout.dpk.
  • C. The package project window Will open.
  • D. Press Install.
  • E. The component is now installed in a new 'XP' page.
  • F. Save the package.

Properties

Apart from common properties, it defines:

  • AbbreviatedName
  • EnglishName
  • LayoutName
  • LocalizedName
  • NativeName

* Use this properties to get the correspending values (as its name suggests) of the current active keyboard layout.

* Setting any of the previous properties will sets the input language, and the values of the other properties will change to reflect the new layout.

  • Handle: To get the keyboard layout handle corresponding to the current set of input locales in the system.

Events

  • OnChange: Accures whenever an input language changes, by changing the control prperties values, or when the user chooses an input language, either with an input language change hotkey or from the system languages menu.

Methods

  • LocalesList : (with overloaded version)

To retrieves the keyboard layout names corresponding to the current set of input locales in the system. The procedure copies the names to the given TStrings.


procedure LocalesList(var List:TStrings; LocaleType: integer); overload;
procedure LocalesList(var List:TStrings; LocaleType: string); overload;

LocalType can be submitted either as an integer or as a string, you can specify one of the following values:

String values:
- 'AbbreviatedName'
- 'EnglishName'
- 'LayoutName'
- 'LocalizedName'
- 'NativeName'

Integer values:
- LOCALE_ILANGUAGE
- LOCALE_SLANGUAGE
- LOCALE_SENGLANGUAGE
- LOCALE_SABBREVLANGNAME
- LOCALE_SNATIVELANGNAME

 

 

Shagrouni 2001-2003 Khaled Shagrouni  khaled@shagrouni.com