You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
InputManager: add unregister_indev function
This commit is contained in:
@@ -29,6 +29,18 @@ class InputManager:
|
||||
if indev and indev not in cls._registered_indevs:
|
||||
cls._registered_indevs.append(indev)
|
||||
|
||||
@classmethod
|
||||
def unregister_indev(cls, indev):
|
||||
"""
|
||||
Unregister an input device.
|
||||
|
||||
Parameters:
|
||||
- indev: LVGL input device object to remove
|
||||
"""
|
||||
if indev in cls._registered_indevs:
|
||||
indev.enable(False)
|
||||
cls._registered_indevs.remove(indev)
|
||||
|
||||
@classmethod
|
||||
def list_indevs(cls):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user