Moderated Closing applications and the keyboard focus


Mark
 

I'm trying to understand some of the principles of the keyboard focus.  Let’s suppose I have six application windows open. I have three Chrome windows open, two Word document windows open, and one File Explorer window open. Let's also assume the keyboard focus is in File Explore on a split button.

If I close File Explorer with alt + f4, then Windows moves the keyboard focus to one of the other application windows. But how does Windows  decide which of the remaining five application windows to choose? I would like to know if there’s some kind of pattern or principle.


Adrian Spratt
 

It depends on the application.

 

Generally, I find that when I close one window, focus moves to the window in focus immediately before.

 

However, you need to be careful with Chrome. If you close a Chrome window with alt-F4, you’ll close the program. Instead, you need to close a Chrome window with control-F4 or control-w to keep the other Chrome windows open.

 

As for Word, unlike other word processors, each document is a separate item. Close it with alt-F4, and the other Word windows stay open. What I don’t understand is this. If I close a non-Word window and a Word document was the window I’d last looked at, focus will return to Word but not necessarily the same document.

 

--

My novel Caroline is now available in paperback, Kindle and audiobook versions and, for qualified readers in the US, at the National Library Service/BARD. Go to: https://adrianspratt.com/book/

 

From: main@jfw.groups.io <main@jfw.groups.io> On Behalf Of Mark
Sent: Friday, November 4, 2022 7:04 AM
To: main@jfw.groups.io
Subject: Closing applications and the keyboard focus

 

I'm trying to understand some of the principles of the keyboard focus.  Let’s suppose I have six application windows open. I have three Chrome windows open, two Word document windows open, and one File Explorer window open. Let's also assume the keyboard focus is in File Explore on a split button.

If I close File Explorer with alt + f4, then Windows moves the keyboard focus to one of the other application windows. But how does Windows  decide which of the remaining five application windows to choose? I would like to know if there’s some kind of pattern or principle.


 

On Fri, Nov 4, 2022 at 07:40 AM, Adrian Spratt wrote:
However, you need to be careful with Chrome. If you close a Chrome window with alt-F4, you’ll close the program. Instead, you need to close a Chrome window with control-F4 or control-w to keep the other Chrome windows open.
-
That does not happen for me.  My Windows configuration is part of my signature and I've got Version 107.0.5304.88.

ALT + F4 with multiple Chrome windows open is following the same protocol it does for all other programs, exiting the specific window that has focus.  I do not know why this is not the case for you, and you are (so far, anyway) the only person I've heard report this.  I thought it might be related to whether the run background processes when Chrome is closed toggle was thrown, but I've tried with this both on and off and I still get ALT + F4 closing only the window that currently has focus.
--

Brian Virginia, USA Windows 10, 64-Bit, Version 22H2, Build 19045  

If you cannot or will not imagine the results of your actions, there’s no way you can act morally or responsibly.  Little kids can’t do it; babies are morally monsters — completely greedy. Their imagination has to be trained into foresight and empathy.

         ~ Ursula LeGuin, 2005 Interview in The Guardian


 

On Fri, Nov 4, 2022 at 07:40 AM, Adrian Spratt wrote:
Generally, I find that when I close one window, focus moves to the window in focus immediately before.
-
I can confirm this is the behavior I observe as well when ALT + F4 is used to close a window.  I think exceptions can occur as far as what receives focus on the desktop if only one application was open.  But if I've got multiple applications open and on the taskbar the one I land in is whatever I was interacting with immediately prior to using ALT + F4 in another window.
--

Brian Virginia, USA Windows 10, 64-Bit, Version 22H2, Build 19045  

If you cannot or will not imagine the results of your actions, there’s no way you can act morally or responsibly.  Little kids can’t do it; babies are morally monsters — completely greedy. Their imagination has to be trained into foresight and empathy.

         ~ Ursula LeGuin, 2005 Interview in The Guardian


Mark
 

Thank you Adrian, Brian. I've been experimenting too and also think the operating system has a list of windows ordered by "last time used." After closing the current window, the operating system moves the keyboard input focus back to previous window in this list; more specifically it moves it to the last touched control type in the previous window.   That's my theory, at least.