@@ -2985,9 +2985,9 @@ def simulate_key(self, key: str) -> None:
29852985 Args:
29862986 key: Key to simulate. May also be the name of a key, e.g. "space".
29872987 """
2988- self .call_later (self .check_bindings , key )
2988+ self .call_later (self ._check_bindings , key )
29892989
2990- async def check_bindings (self , key : str , priority : bool = False ) -> bool :
2990+ async def _check_bindings (self , key : str , priority : bool = False ) -> bool :
29912991 """Handle a key press.
29922992
29932993 This method is used internally by the bindings system.
@@ -3058,7 +3058,7 @@ async def on_event(self, event: events.Event) -> None:
30583058 self .screen ._clear_tooltip ()
30593059 except NoScreen :
30603060 pass
3061- if not await self .check_bindings (event .key , priority = True ):
3061+ if not await self ._check_bindings (event .key , priority = True ):
30623062 forward_target = self .focused or self .screen
30633063 forward_target ._forward_event (event )
30643064 else :
@@ -3240,7 +3240,7 @@ async def _on_layout(self, message: messages.Layout) -> None:
32403240 message .stop ()
32413241
32423242 async def _on_key (self , event : events .Key ) -> None :
3243- if not (await self .check_bindings (event .key )):
3243+ if not (await self ._check_bindings (event .key )):
32443244 await self .dispatch_key (event )
32453245
32463246 async def _on_shutdown_request (self , event : events .ShutdownRequest ) -> None :
@@ -3471,14 +3471,13 @@ def _watch_app_focus(self, focus: bool) -> None:
34713471 # Remove focus for now.
34723472 self .screen .set_focus (None )
34733473
3474- async def action_check_bindings (self , key : str ) -> None :
3474+ async def action_simulate_ky (self , key : str ) -> None :
34753475 """An [action](/guide/actions) to handle a key press using the binding system.
34763476
34773477 Args:
34783478 key: The key to process.
34793479 """
3480- if not await self .check_bindings (key , priority = True ):
3481- await self .check_bindings (key , priority = False )
3480+ self .simulate_key (key )
34823481
34833482 async def action_quit (self ) -> None :
34843483 """An [action](/guide/actions) to quit the app as soon as possible."""
0 commit comments