InputDevice

Contains basic info about the input device. Child classes might also contain references to OS variables and pointers.

Members

Enums

StatusFlags
enum StatusFlags

Defines common status codes

Functions

battP
ubyte battP()

Returns the battery percentage of the device, or ubyte.max if it doesn't have a battery.

devNum
ubyte devNum()

Returns the device number.

isAnalog
bool isAnalog()

Returns true if device has analog capabilities.

isConnected
bool isConnected()

Returns true if the device is connected.

isInvalidated
bool isInvalidated()

Returns true if device got invalidated (disconnected, etc).

isVirtual
bool isVirtual()

Returns true if device is virtual, emulated, etc.

poll
int poll(InputEvent output)

Polls the device for events.

type
InputDeviceType type()

Returns the type of the device.

Variables

_battP
ubyte _battP;

Current percentage of the battery

_devNum
ubyte _devNum;

Defines the number of the input device within the group of same types

_type
InputDeviceType _type;

Defines the type of the input device

status
ushort status;

Status flags of the device. Bits 0-7 are common, 8-15 are special to each device/interface type. Note: flags related to indicators/etc should be kept separately.

Meta