aboutsummaryrefslogtreecommitdiff
path: root/uinput_mng
diff options
context:
space:
mode:
Diffstat (limited to 'uinput_mng')
-rwxr-xr-xuinput_mng6
1 files changed, 5 insertions, 1 deletions
diff --git a/uinput_mng b/uinput_mng
index 9a31dc6..e000b15 100755
--- a/uinput_mng
+++ b/uinput_mng
@@ -53,6 +53,8 @@ class Controller:
elif cmd == 'list':
for d in self._in_devices:
sys.stderr.write(d + '\n')
+ elif cmd == 'clear':
+ self._in_devices.clear()
else:
self._logger.error('Unknown command: %s', line)
@@ -177,9 +179,11 @@ class PhysDevices(dict):
def __exit__(self, exc_type, exc_value, traceback):
self.close()
- def close(self):
+ def clear(self):
for path in list(self.keys()):
self.remove(path)
+ def close(self):
+ self.clear()
def add(self, path):
if path in self: