Class TWindowsKeyboard (unit Keyboard)

Inherits from

TInputDevice

Definition of the TWindowsKeyboard class.

Constructors


constructor Create;

Class constructor and destructor.


Functions

procedure AssociateKey(wKeyCode: Word; iInputCode: Integer);

Method to associate a key with an input.

destructor Destroy;

Create a list to manage key associations.

function iGetInputCodeFromKey(wKeyCode: Word): Integer;

Functions to convert between key code and input codes.

procedure ProcessKeyDown(var wKeyCode: Word; Shift: TShiftState);

Interface for processing keyboard events directly.

procedure ProcessKeyUp(var wKeyCode: Word; Shift: TShiftState);

Get a reference to the input object itself, and mark it as selected.

function szGetTextFromKeyCode(wKeyCode: Word): String;

Functions to translate VK-codes and text.

function wGetKeyCodeFromInput(iInputCode: Integer): Word;

Look at each association in the list for a match.

function wGetKeyCodeFromText(szText: String): Word;

Return text for the given key code.

Properties

Events

Variables

m_lstKeyAssociations : TList;



Constructors


constructor Create;

Class constructor and destructor.

List of key associations.


Functions


procedure AssociateKey(wKeyCode: Word; iInputCode: Integer);

Method to associate a key with an input.

Perform default cleanup.


destructor Destroy;

Create a list to manage key associations.


function iGetInputCodeFromKey(wKeyCode: Word): Integer;

Functions to convert between key code and input codes.

Get a reference to the input object itself, and mark it as deselected.


procedure ProcessKeyDown(var wKeyCode: Word; Shift: TShiftState);

Interface for processing keyboard events directly.

(Re)initialize the key association structure.


procedure ProcessKeyUp(var wKeyCode: Word; Shift: TShiftState);

Get a reference to the input object itself, and mark it as selected.


function szGetTextFromKeyCode(wKeyCode: Word): String;

Functions to translate VK-codes and text.

Look at each association in the list for a match.


function wGetKeyCodeFromInput(iInputCode: Integer): Word;

Look at each association in the list for a match.


function wGetKeyCodeFromText(szText: String): Word;

Return text for the given key code.


Properties


Events


Variables


m_lstKeyAssociations : TList;