Deregister an input device

Description

How do I re-register an input device.

What do you want to achieve?

The point is, that one can register an input device using lv_indev_drv_register. However, how does one proceed if one wants to remove/change that device. A possible use case would be the unplugging of an input device.

At the moment, there is no lv_indev_remove API. :confused:

If you have the RAM, a workaround would be to keep the device registered and detect whether it’s plugged in or not within the read_cb function (if it’s not, just act as if no key/point is pressed).

Thank you for your answer. I had implemented the solution you described by having a no-op read_cb function, that set the key to 0 and pressed to false…