getDevice

abstract fun getDevice(): Optional<InputDevice>

Gets the current input device if it was initialized in initialize.

Return

An optional containing the current input device, if available; otherwise, an empty optional.