You can edit almost every page by Creating an account. Otherwise, see the FAQ.

MRU window-switching order

From EverybodyWiki Bios & Wiki

The Most Recently Used (MRU) method of window-switching order is an algorithm which is used by several programs with an multiple document interface (MDI) to determine which window to focus from the current one.

In an MDI environment, one particular piece of software manages several files at the same time but the user mostly interacts with one file. For example, Word processor applications, like Microsoft Word or LibreOffice Writer can keep more documents opened, a photo-manipulation application like Photoshop or GIMP can have more images opened, and so on. Each individual document, image, etc. has their own window within the parent application.

When the user wants to switch from one window to the other one, using the keyboard, then most of the applications use the MRU technique to determine which window to jump to.

The MRU technique means that from the current window, focusing the last visited window requires the least number of action (key presses), the next recently used one needs more actions, and so on. The window that was used the longest time ago, it needs the most key presses.

Key combinations for changing windows[edit]

The required action for window changing in most of the applications is pressing the Ctrl and the Tab keys in a specific order. Operating systems, however, use the Alt and Tab keys for changing windows.

The required key operations is denoted by Ctrl+Tab or Alt+Tab which mean the following steps:

  1. pressing and keeping the Ctrl (or Alt) key pressed
  2. pressing and then releasing Tab
  3. releasing Ctrl (or Alt) as well.

The Ctrl+Tab+Tab or Alt+Tab+Tab notations mean:

  1. pressing and keeping the Ctrl (or Alt) key pressed
  2. pressing and then releasing Tab
  3. pressing and then releasing Tab again
  4. releasing Ctrl (or Alt) as well.

and so on, Ctrl+Tab+Tab+...+Tab means pressing Tab several times while the Ctrl is kept pressed continuously.

Example for MRU swiching[edit]

  • A user opens five documents after each other: #1, #2, #3, #4, #5.
  • Now the order of the windows in the order of their last usage is #5, #4, #3, #2, #1 which means that currently #5 is in focus. Before opening #5, #4 was in focus, prior to that one #3 was, etc..,
    • If the user wanted to go from #5 to #4 then they could do it by pressing Ctrl+Tab
    • If the user wanted to go from #5 to #3 then they could do it by pressing Ctrl+Tab+Tab
  • If the user jumps from #5 to #3 with Ctrl+Tab+Tab then the order of the documents becomes is #3, #5, #4, #2, #1.
  • Now the user can focus #1 by Ctrl+Tab+Tab+Tab+Tab which changes the order to #1, #3, #5, #4, #2.
  • Now the user can alternate between #1 and #3 simply by pressing Ctrl+Tab again and again

Algorithm description[edit]

  • Let's manage the opened windows in a list.
  • When a new window is opened then add it to the front of the list.
  • When a window is closed then remove it from the list.
  • When window #i is brought into focus then move #i from its current position to the front of the list.

Benefit of MRU[edit]

The basic idea behind the MRU technique is that in most cases, if a user keeps more windows open at the same time then they don't want to use them equally. It is much more likely that they jump only amongst the last two or three windows and if there is a fourth one opened as well which was used longer time ago then it is less likely to be needed again. Thus, the more frequent actions need less key presses while the less frequent ones need more. Subsequently, working with an application that is using the MRU algorithm is easier, faster and more efficient.

Drawback of MRU[edit]

The MRU algorithm maintains the list of the windows in order to know which window to focus after a certain number of key presses. The order of the windows in this list is changing after each window change and it is hard for the user to keep in mind how many key presses a certain window needs to bring it into focus.

In order to cope with this program, some software show the content of the list of the windows when the user starts the key presses for changing window, that is, after the first Tab while Ctrl or Alt is pressed.

Alternative to MRU: order of opening time (OoOT)[edit]

Most applications that don't use MRU technique, they use the order of opening time of the files. This means that from the current document, reaching the one that was opened right after the current window needs the least number of actions. After the most recently opened document, the first one comes again.

Example for non-MRU (OoOT) swiching[edit]

  • A user opens five documents after each other: #1, #2, #3, #4, #5.
  • If the user wants to go from #5 to #1 then it needs Ctrl+Tab
  • If the user wants to go from #5 to #4 then it needs Ctrl+Tab+Tab+Tab+Tab

Benefit of the OoOT algorithm[edit]

The benefit of this technique is that moving from window #i to #j always needs the same amount of actions, as long as no windows between them gets closed.

Drawback of OoOT[edit]

Alternating between #i and #(i+1) adjacent windows needs 1 step in one direction and N-1 in the opposite direction (where N is the number of the windows) which is more complicated than the MRU case which needs the same one action in both directions.

Window-switching order of some software[edit]

Some programs that use MRU[edit]

  1. Windows
  2. MacOS
  3. most of the Linux desktops (KDE, GNOME, ...)
  4. Microsoft Word
  5. LibreOffice Writer
  6. PhpStorm
  7. NetBeans
  8. Sublime
  9. UltraEdit for Windows

Some programs that don't use MRU[edit]

  1. Firefox (MRU can be reached by add-on [1]
  2. Chrome (MRU can be reached by extension [2])
  3. Total Commander
  4. UltraEdit for Mac

References[edit]

  1. "Firefox add-on called "Tab Mix Plus"". Retrieved 2017-08-10.
  2. "Chrome Extension called "Ctrl+Tab MRU"". Retrieved 2017-08-10.


This article "MRU window-switching order" is from Wikipedia. The list of its authors can be seen in its historical. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.