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

8 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-04-20 06:09 +0000

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()