Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/focus.py: 75%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

1from __future__ import annotations 

2 

3from prompt_toolkit.key_binding.key_processor import KeyPressEvent 

4 

5__all__ = [ 

6 "focus_next", 

7 "focus_previous", 

8] 

9 

10E = KeyPressEvent 

11 

12 

13def focus_next(event: E) -> None: 

14 """ 

15 Focus the next visible Window. 

16 (Often bound to the `Tab` key.) 

17 """ 

18 event.app.layout.focus_next() 

19 

20 

21def focus_previous(event: E) -> None: 

22 """ 

23 Focus the previous visible Window. 

24 (Often bound to the `BackTab` key.) 

25 """ 

26 event.app.layout.focus_previous()