Adapting code to the 'capture' of the DeviceListener.