Class Documentation

Name:Keyboard
Version:1
ID:ID_KEYBOARD
Status:Unspecified
Category:I/O
Date:May 2001
Author:Rocklyte Systems
Copyright:  Rocklyte Systems (c) 1996-2001. All rights reserved.
Short:  The keyboard class is used to manage keyboard I/O.



Description

The Keyboard class is a dummy class type that is used to create objects that represent key-based hardware devices. This means that Keyboard objects don't actually read hardware, they just receive input from the devices responsible for controlling keyboard I/O. Objects that subscribe to a Keyboard object's data channel can then receive this input in a format that is standardised by the Pandora Engine.

The most common Keyboard object is the 'SystemKeyboard' object, which is created during the boot process. This particular object represents the main PC keyboard. If you are designing a system in which you want multiple keyboards, you can create as many Keyboard objects as you have hardware or virtual devices to associate with them. This can be useful for hooking up remote keyboards over a network, or attaching extra devices that have their own keyboard to a PC.

The Keyboard class does not export any fields or methods - it only supports the DataChannel action for the purpose of manipulating incoming data.

Actions

The Keyboard class supports the following actions:

DataChannel  This action can be used to send fake keyboard input.
Action:DataChannel
Short:This action can be used to send fake keyboard input.

Keypresses can be sent to a Keyboard object through the DataChannel action by using the DATA_KEYPRESS data type. All characters that are sent to a Keyboard object through the data channel will inevitably be reported to programs that read the Keyboard through the data channel service.

Please note that it is extremely important that the key qualifiers are set correctly and that each key press is matched with a key release. If the data is not defined correctly, the objects receiving the data may not interpret it as intended.

Result
ERR_Okay  The input was successfully processed.
ERR_Args  Invalid arguments were specified.
ERR_AccessMemory  Access to the internal channel list was denied.