Share via


PosKeyboard Class

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

Usage

'Usage
Dim posKeyboard1 As New PosKeyboard()

Syntax

'Declaration
MustInherit Public Class PosKeyboard
    Inherits PosCommon
public abstract class PosKeyboard : PosCommon
public abstract ref class PosKeyboard : public PosCommon
public abstract class PosKeyboard extends PosCommon
public abstract class PosKeyboard extends PosCommon

Remarks

Keyboard device classes in POS for .NET support reading keys from a keyboard. A POS keyboard device may be an auxiliary keyboard, or it may be a virtual keyboard consisting of some or all of the keys on the system keyboard.

Programming Model

The PosKeyboard class follows the general programming model for event-driven input:

  • When input is received by the service object, it queues a DataEvent.

  • If the AutoDisable property is set to TRUE, then the service object automatically disables the keyboard device when a DataEvent is queued.

  • A queued DataEvent can be delivered to the application when the DataEventEnabled property is set to TRUE. Just before delivering this event, the service object copies the data into properties and disables further data events by setting the DataEventEnabled property to FALSE. This causes subsequent input data to be queued by the service object while the application processes the current input and associated properties. When the application has finished the current input and is ready for more data, it enables events by setting DataEventEnabled to TRUE.

  • An ErrorEvent (or events) are queued if the service object encounters an error while gathering or processing input, and it is delivered to the application when the DataEventEnabled property is TRUE.

  • The DataCount property can be read to obtain the number of DataEvent events queued by the service object.

  • All input queued by the service object can be deleted by calling the ClearInput method.

Keyboard Translation

The POS keyboard’s service object must supply a mechanism for translating its internal key codes into user-defined codes that are returned by the data events. This translation should be end-user configurable.

Device Sharing

The POS keyboard is an exclusive-use device, meaning that:

  • The application must claim the device before enabling it.

  • The application must claim and enable the device before the device begins reading input.

Inheritance Hierarchy

System.Object
   Microsoft.PointOfService.PosDevice
     Microsoft.PointOfService.PosCommon
      Microsoft.PointOfService.PosKeyboard
         Microsoft.PointOfService.BasicServiceObjects.PosKeyboardBasic

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

PosKeyboard Members
Microsoft.PointOfService Namespace