panda3d.core.InputDeviceManager

class InputDeviceManager

This class keeps track of all the devices on a system, and sends out events when a device has been hot-plugged.

New in version 1.10.0.

Inheritance diagram

Inheritance diagram of InputDeviceManager

getDevices() → InputDeviceSet

Description: Returns all currently connected devices.

Return type

InputDeviceSet

getDevices(device_class: DeviceClass) → InputDeviceSet

Description: Returns all currently connected devices of the given device class.

Return type

InputDeviceSet

addDevice(device: InputDevice) → None

Called when a new device has been discovered. This may also be used to register virtual devices.

This causes a connect-device event to be thrown.

removeDevice(device: InputDevice) → None

Called when a device has been removed, or when a device should otherwise no longer be tracked.

This causes a disconnect-device event to be thrown.

update() → None

Polls the system to see if there are any new devices. In some implementations this is a no-op.

static getGlobalPtr() → InputDeviceManager

Returns the singleton InputDeviceManager instance.

Return type

InputDeviceManager