Share via


BumpBar.SetKeyTranslation Method

Assigns a logical key value to key scan code.

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Usage

'Usage
Dim units As DeviceUnits
Dim scanCode As Integer
Dim logicalKey As Integer
Dim bumpBar1 As BumpBar
bumpBar1.SetKeyTranslation(units, scanCode, logicalKey)

Syntax

'Declaration
Public MustOverride Sub SetKeyTranslation( _
    ByVal units As DeviceUnits, _
    ByVal scanCode As Integer, _
    ByVal logicalKey As Integer _
)
public abstract void SetKeyTranslation(
    DeviceUnits units,
    int scanCode,
    int logicalKey
);
public: abstract Void SetKeyTranslation(
    DeviceUnits^ units,
    Int32 scanCode,
    Int32 logicalKey
);
public abstract void SetKeyTranslation(
    DeviceUnits units,
    int scanCode,
    int logicalKey
);
public abstract function SetKeyTranslation(
     units : DeviceUnits,
     scanCode : int,
     logicalKey : int
) : Void;

Parameters

  • units
    Bitwise mask indicating which bump bar unit(s) to set key translation for.
  • scanCode
    The bump bar generated key scan code. Valid values 0-255.
  • logicalKey
    The translated logical key value. Valid values 0-255.

Remarks

SetKeyTranslation assigns a logical key value to a device-specific key scan code for the bump bar unit(s) specified by the units parameter. The logical key value is used during translation during the DataEvent.

SetKeyTranslation returns void if successful, and can throw the following exception:

Value

Meaning

Illegal

One of the following errors occurred:

  • scanCode or logicalKey are out of range.

  • units is zero or a non-existent unit was specified.

The DeviceErrorEventArgs.ErrorCode and DeviceErrorEventArgs.ErrorCodeExtended properties are updated before return.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

See Also

Reference

BumpBar Class
BumpBar Members
Microsoft.PointOfService Namespace
ErrorUnits
ErrorString
DataEvent