Parse a key into a list of modifiers, and the actual key. Returns: A tuple of (MODIFIER LIST, KEY).
(self)
| 98 | """Optional binding group (used to group related bindings in the footer).""" |
| 99 | |
| 100 | def parse_key(self) -> tuple[list[str], str]: |
| 101 | """Parse a key into a list of modifiers, and the actual key. |
| 102 | |
| 103 | Returns: |
| 104 | A tuple of (MODIFIER LIST, KEY). |
| 105 | """ |
| 106 | *modifiers, key = self.key.split("+") |
| 107 | return modifiers, key |
| 108 | |
| 109 | def with_key(self, key: str, key_display: str | None = None) -> Binding: |
| 110 | """Return a new binding with the key and key_display set to the specified values. |