| 37 | return super().mouse_event(size, event, button, col, row, focus) |
| 38 | |
| 39 | def keypress(self, size, key): |
| 40 | # Make sure that we don't propagate cursor events outside of the widget. |
| 41 | # Otherwise, in a horizontal layout, urwid's Pile would change the focused widget |
| 42 | # if we cannot scroll any further. |
| 43 | ret = super().keypress(size, key) |
| 44 | command = self._command_map[ |
| 45 | ret |
| 46 | ] # awkward as they don't implement a full dict api |
| 47 | if command and command.startswith("cursor"): |
| 48 | return None |
| 49 | return ret |
| 50 | |
| 51 | |
| 52 | class WindowStack: |