System

Implements a class for system-wide events.

Under Windows, this class also handles keyboard and mouse inputs, because of Microsoft of course (Why? You did great with WASAPI and relatively good with MIDI!)

Note: Polling might suck up some more advanced windowing-related events. If they really needed, then just add handling of them to it with OOP magic!

Constructors

this
this()
Undocumented in source.

Members

Functions

poll
int poll(InputEvent output)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

keyb
Keyboard keyb;

Pointer to the default, non-virtual keyboard.

lastChar
char[8] lastChar;

Character input converted to UTF-8

lastChar
dchar lastChar;

Character input converted to UTF-32

lastMousePos
int[2] lastMousePos;

Last position of the mouse cursor.

mouse
Mouse mouse;

Pointer to the default, non-virtual mouse.

winCount
size_t winCount;

Window counter.

Inherited Members

From InputDevice

_type
InputDeviceType _type;

Defines the type of the input device

_devNum
ubyte _devNum;

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

_battP
ubyte _battP;

Current percentage of the battery

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.

StatusFlags
enum StatusFlags

Defines common status codes

type
InputDeviceType type()

Returns the type of the device.

devNum
ubyte devNum()

Returns the device number.

isConnected
bool isConnected()

Returns true if the device is connected.

isInvalidated
bool isInvalidated()

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

isAnalog
bool isAnalog()

Returns true if device has analog capabilities.

isVirtual
bool isVirtual()

Returns true if device is virtual, emulated, etc.

battP
ubyte battP()

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

poll
int poll(InputEvent output)

Polls the device for events.

Meta