PosKeyboard Class (POS for .NET v1.12 SDK Documentation)
2/27/2008
Defines the programmatic interface for a UPOS Keyboard device.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustInherit Class PosKeyboard
Inherits PosCommon
public abstract class PosKeyboard : PosCommon
public ref class PosKeyboard abstract : 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 that consists of some or all 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 event.
If the AutoDisable property is set to true, then the service object automatically disables the keyboard device when a DataEvent event is queued.
A queued DataEvent event 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 additional data events by setting the DataEventEnabled property to false. This causes later 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 property to true.
An ErrorEvent event (or events) is queued if the service object encounters an error while collecting 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. This means that the following applies:
The application must claim the device before the application enables 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.