MCPcopy Index your code
hub / github.com/Textualize/textual / ScreenWithMovementBindings

Class ScreenWithMovementBindings

tests/test_binding_inheritance.py:292–305  ·  view source on GitHub ↗

A screen that binds keys, including movement keys.

Source from the content-addressed store, hash-verified

290
291
292class 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
308class AppWithScreenWithBindingsWidgetNoBindings(AppKeyRecorder):

Callers

nothing calls this directly

Calls 1

make_bindingsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…