A screen that binds keys, including movement keys.
| 290 | |
| 291 | |
| 292 | class ScreenWithMovementBindings(Screen): |
| 293 | """A screen that binds keys, including movement keys.""" |
| 294 | |
| 295 | BINDINGS = AppKeyRecorder.make_bindings("screen_") |
| 296 | |
| 297 | async def action_screen_record(self, key: str) -> None: |
| 298 | # Sneaky forward reference. Just for the purposes of testing. |
| 299 | await self.app.action_record(f"screenly_{key}") |
| 300 | |
| 301 | def compose(self) -> ComposeResult: |
| 302 | yield FocusableWidgetWithNoBindings() |
| 303 | |
| 304 | def on_mount(self) -> None: |
| 305 | self.query_one(FocusableWidgetWithNoBindings).focus() |
| 306 | |
| 307 | |
| 308 | class AppWithScreenWithBindingsWidgetNoBindings(AppKeyRecorder): |
nothing calls this directly
no test coverage detected
searching dependent graphs…