Command block to exit the above application

I have a 1 . monitor
is home page, screen 2, screen 3 is content. After pressing the back button to screen 1 and then at screen 1 press exit to exit, please help Command block to exit the above application

If I undestood correcty if you are in a screen other than Screen1 you wish to go to Screen1 if back is pressed otherwise if you are on Screen when back is pressed you wish to close app ?

If this is the case in all screen besides Screen1 add

image

In Screen1

image

2 Likes

Only a Word " CONFUSED "
Please describe in clear sentences.