Unbind also removes the binding from the list.
(self, binding: Binding)
| 126 | self.keys[c][binding.keyspec()] = binding |
| 127 | |
| 128 | def unbind(self, binding: Binding) -> None: |
| 129 | """ |
| 130 | Unbind also removes the binding from the list. |
| 131 | """ |
| 132 | for c in binding.contexts: |
| 133 | del self.keys[c][binding.keyspec()] |
| 134 | self.bindings = [b for b in self.bindings if b != binding] |
| 135 | self._on_change() |
| 136 | |
| 137 | def get(self, context: str, key: str) -> Binding | None: |
| 138 | if context in self.keys: |