[Contents] [Index] [Next] [Previous]

Focus


Description

The keyboard focus model is defined by a focus policy. A focus policy is a specific mechanism for moving the focus among windows and components. The implicit and explicit focus policies must be supported.

In the implicit focus policy, also called the pointer, real-estate driven, or point-to-type policy, the keyboard focus moves to the window or component into which a user moves the mouse pointer. No explicit action is performed to set the keyboard focus in the implicit focus model. Keyboard events are sent to the window or component that the mouse pointer is in, more specifically to the component that the mouse pointer is in. In implicit mode, the keyboard focus tracks the mouse pointer. Because of this, there is no way to move the keyboard focus from the keyboard using implicit mode. In this focus policy, the location cursor for keyboard events does not need to be shown; however, the application can show it.

The explicit focus policy requires the user to explicitly select which window or component receives the keyboard focus. In explicit focus mode at the window level, a user moves the keyboard focus to a window by pressing BSelect while the mouse pointer is over the window. Simply moving the mouse pointer over a window does not give the window the keyboard focus. Because of this, explicit mode is often called click-to-type. In explicit mode within a window, a user generally moves the keyboard focus to a specific component within a window by pressing BSelect over the component. Pressing BSelect must not move focus to a component that is not traversable or does not accept input. Pressing BSelect in a component that is used only to change the visible portion of another component, such as a ScrollBar or Sash, should act on that component but should not move focus to it. In this focus policy, the location of keyboard focus must be shown by a location cursor.

Related Information

See Input Models for more information about the focus model.