Focus (computing)
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, the focus indicates the component of the graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

 which is currently selected to receive input. Text entered at the keyboard or pasted from a clipboard
Clipboard (software)
The clipboard is a software facility that can be used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations...

 is sent to the component which currently has the focus. Moving the focus away from a specific user interface element is known as a blur event in relation to this element. Typically, the focus is withdrawn from an element by giving another element the focus. This means that focus and blur events typically both occur virtually simultaneously, but in relation to different user interface events, one that gets the focus and one that gets blurred.

The concept is similar to a cursor in a text-based environment. However, when considering a graphical interface, there is also a mouse cursor involved. Moving the mouse will typically move the mouse cursor without changing the focus. The focus can usually be changed by clicking on a component that can receive focus with the mouse. Many desktops also allow the focus to be changed with the keyboard. By convention, the tab key is used to move the focus to the next focusable component and shift + tab to the previous one. When graphical interfaces were first introduced, many computers did not have mice, so this alternative was necessary. This feature makes it easier for people that have a hard time using a mouse to use the user interface. In certain circumstances, the arrow keys can also be used to move focus.

Window focus

The behaviour of focus on one's desktop can be governed by policies in window management.

Click to focus

On most mainstream user-interfaces, such as ones made by Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 and Apple, it is common to find a "focus follows click" policy (or "click to focus"), where one must click the mouse inside of the window for that window to gain focus. This also typically results in the window being raised above all other windows on screen. If a clickfocus model such as this is being used, the current application window continues to retain focus and collect input, even if the mouse pointer is over another application window.

Focus follows pointer

Another common policy on UNIX
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 systems using X11 is the "focus follows mouse" policy (or FFM), where the focus automatically follows the current placement of the pointer. The focused window is not necessarily raised; parts of it may remain below other windows. Window managers with this policy usually offer "autoraise," which raises the window when it is focused, typically after a configurable short delay. One consequence of a followfocus policy is that no window has focus when the pointer is moved over the background with no window underneath.

Sloppy focus

The sloppyfocus model is a variant of the followfocus model. It allows input to continue to be collected by the last focused window when the mouse pointer is moved away from any window, such as over a menubar or desktop area.

Focus models used by X11 window managers

  • aewm - focus follows pointer
  • aewm++ - click to focus
  • ahwm - click to focus, sloppy focus
  • ctwm
    CTWM
    In Unix computing, CTWM is a stacking window manager for the X Window System in the twm family of window managers...

     - click to focus, focus follows pointer, sloppy focus
  • e16
    Enlightenment (window manager)
    Enlightenment, also known simply as E, is a stacking window manager for the X Window System which can be used alone or in conjunction with a desktop environment such as GNOME or KDE...

     - sloppy focus (default), focus follows pointer, click to focus
  • evilwm - focus follows pointer
  • flwm
    FLWM
    The Fast Light Window Manager is a stacking window manager written in C++ and available for redistribution under the terms of the GNU General Public Licence.- Features :Features of the FLWM window manager include:* Stacking windows* Written in C++...

     - sloppy focus
  • fvwm
    FVWM
    The F Virtual Window Manager is a virtual window manager for the X Window System. Originally a twm derivative, FVWM has evolved into a powerful and highly configurable environment for Unix-like systems.- History:...

     - sloppy focus
  • karmen
    KARMEN
    KARMEN , a detector associated with the ISIS synchrotron at the Rutherford Appleton Laboratory...

     - click to focus
  • lwm
    LWM
    LWM could refer to:* Landeswettbewerb Mathematik Baden-Württemberg, a mathematics competition in Germany.* Lawrence Municipal Airport , United States; IATA airport code LWM.* Lightweight window manager...

      - click to focus, sloppy focus
  • tinywm - sloppy focus
  • whim
    Whim
    Whim may refer to:* Whim , a capstan or drum with a vertical axle used in mining* Whim , a type of carriage* Whim, a reissue of Adventures of Wim, a book by George Cockroft as Luke Rhinehart...

     - click to focus, sloppy focus
  • windowlab
    WindowLab
    WindowLab is an X window manager for Unix-like systems. It is based on aewm and retains that window manager's small and lightweight nature. In many aspects, WindowLab has looked to the Amiga's user interface for inspiration without cloning it completely...

     - click to focus (with no autoraise)
  • xfwm4 - click to focus, focus follows pointer, sloppy focus

Intra-window component focus

Individual components may also have a cursor position. For instance in a text editing package, the text editing window must have the Focus so that text can be entered. When text is entered into the component, it will appear at the position of the text-cursor, which will also normally be moveable using the mouse cursor.

Which component should have the default focus, and how focus should move between components, are difficult but important problems in user interface design. Giving the wrong thing focus means that the user has to waste time moving the focus. Conversely, giving the right thing focus can significantly enhance the user experience.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK