Set the keymap to associate with the specified tool Parameters ---------- name : string Name of the Tool keys : keys to associate with the Tool
(self, name, *keys)
| 184 | del self._keys[k] |
| 185 | |
| 186 | def update_keymap(self, name, *keys): |
| 187 | """ |
| 188 | Set the keymap to associate with the specified tool |
| 189 | |
| 190 | Parameters |
| 191 | ---------- |
| 192 | name : string |
| 193 | Name of the Tool |
| 194 | keys : keys to associate with the Tool |
| 195 | """ |
| 196 | |
| 197 | if name not in self._tools: |
| 198 | raise KeyError('%s not in Tools' % name) |
| 199 | |
| 200 | self._remove_keys(name) |
| 201 | |
| 202 | for key in keys: |
| 203 | for k in validate_stringlist(key): |
| 204 | if k in self._keys: |
| 205 | warnings.warn('Key %s changed from %s to %s' % |
| 206 | (k, self._keys[k], name)) |
| 207 | self._keys[k] = name |
| 208 | |
| 209 | def remove_tool(self, name): |
| 210 | """ |
no test coverage detected