java.sun.com and JLF home page   Previous Next Contents/Index/Search

A: Keyboard Navigation, Activation, and Selection

This appendix defines the keyboard operations that enable users to navigate through, activate, or select the JFC user interface components. (Navigating means to move the input focus from one user interface component to another; activating refers to operating the component; selecting means to choose one or more components, typically for a subsequent action.) For an overview of these concepts, see Keyboard Navigation and Activation.

In general, navigating between components uses these keys:

This appendix presents the JFC-supplied keyboard navigation, activation, and selection operations in a series of tables, arranged alphabetically by component. The left column of each table describes an action (for example, moving focus to the left) and the right column describes its keyboard operation (for example, left arrow key).

Some actions in the table list several possible keyboard operations, separated by a comma. For example, both Home and Ctrl-Home move focus to the beginning of a list. Multiple operations take into account the differences between the Microsoft Windows and CDE operating environments. If you are using an environment other than the Microsoft Windows or CDE operating environment, implement the keyboard operation that is most appropriate for your environment.

Some of the keyboard operations described in the following tables might be temporarily incomplete or not implemented. However, these key sequences should be reserved for future versions of the JFC and the Java 2 platform.

 


Checkboxes

The following table lists the keyboard operation for checkboxes. For more information on this component, see Checkboxes.

Table  13 Keyboard Operation for Checkboxes
Action
Keyboard Operation
Selects or deselects checkbox Spacebar

 


Combo Boxes

The following table lists the keyboard operations for combo boxes. For details on this component, see Combo Boxes.

Table  14 Keyboard Operations for Combo Boxes
Action
Keyboard Operation
Posts associated list Spacebar, down arrow,
Alt-down arrow
Moves highlight within list when menu is posted. Selects highlighted item Up arrow, down arrow
Closes list, maintaining latest selection Enter, Return, spacebar,
Escape

 


Command Buttons

The following table lists the keyboard operations for command buttons. For more information on this component, see Command Buttons.

Table  15 Keyboard Operations for Command Buttons
Action
Keyboard Operation
Activates command button Spacebar
Activates default button (does not require keyboard focus) Enter, Return
Activates Cancel button (does not require keyboard focus) Escape

 


Desktop Panes and Internal Frames

The following table lists the keyboard operations for desktop panes and internal frames. For details on internal frames and desktop panes, see Working With Multiple Document Interfaces.

Table  16 Keyboard Operations for Desktop Panes and Internal Frames 
Action
Keyboard Operation
Opens internal frame Ctrl-F5
Closes internal frame Ctrl-F4
Moves internal frame Ctrl-F7
Resizes internal frame Ctrl-F8
Minimizes internal frame Ctrl-F9
Navigates first between open internal frames, then among minimized internal frames Ctrl-Esc, Ctrl-Tab, Shift-Esc, Shift-Tab
Opens minimized internal frame that has keyboard focus Ctrl-F5, Enter, Return
Navigates among associated windows on the desktop pane Ctrl-F6, Shift-Ctrl-F6
Navigates between associated windows when an internal frame creates a secondary window Ctrl-F6, Shift-Ctrl-F6
Displays desktop contextual menu Ctrl-spacebar

 


Dialog Boxes

The following table lists the keyboard operations for dialog boxes, alert boxes, and utility windows. For comprehensive treatment of dialog boxes and alert boxes, see Chapter 8. For a discussion of utility windows, see Utility Windows.

Table  17 Keyboard Operations for Dialog Boxes 
Action
Keyboard Operation
Navigates into dialog box Alt-F6
Navigates out of dialog box Alt-F6
Activates Cancel button Escape
Activates default command button Enter, Return

 


HTML Editor Kits

HTML editor kits use the navigation, selection, and activation sequences described in Table 27, plus the two listed here. For details on the appearance and behavior of this component, see HTML Editor Kit.

Table  18 Keyboard Operations for HTML Panes
Action
Keyboard Operation
Navigates to link and other focusable elements Tab, Shift-Tab, Ctrl-Tab,
Shift-Ctrl-Tab
Activates link Enter, Return, spacebar

 


Lists

The actions listed in the following table assume multiple selection in lists. For more information on the appearance, behavior, and selection of this component, see Lists.

Table  19 Keyboard Operations for Lists 
Action
Keyboard Operation
Moves focus up one row or line Up arrow
Moves focus down one row or line Down arrow
Moves focus up one view minus one line, giving focus to first line in the view Page Up
Moves focus down one view minus one line, giving focus to first line in the view Page Down
Moves focus to beginning of list Home, Ctrl-Home
Moves focus to end of list End, Ctrl-End
Selects all items in list Ctrl-A, Ctrl-/
Deselects all Ctrl-/
Makes a selection (and deselects any previous selection) Spacebar
Toggles selection (and does not affect previous selections) Ctrl-spacebar
Extends selection Shift-spacebar
Extends selection down one item Shift-down arrow
Extends selection up one item Shift-up arrow
Extends selection to beginning of list Shift-Home
Extends selection to end of list Shift-End
Extends selection up one view Shift-PgUp
Extends selection down one view Shift-PgDn

 


Menus

The keyboard operations in this table apply to menu bars, menus, drop-down menus, submenus, contextual menus, menu items, radio button menu items, and checkbox menu items. For a discussion of menus, see Chapter 9.

Table  20 Keyboard Operations for Menus 
Action
Keyboard Operation
Posts current menu Enter, Return, spacebar, arrow keys
Dismisses menu without taking action and returns focus to last component that had focus Escape
Moves focus to menu bar and posts first menu F10
Navigates within menus Arrow keys
Navigates between titles in menu bar Arrow keys
Activates a menu item, dismisses menu, and goes to last window item with focus Enter, Return, spacebar
Displays contextual menu Shift-F10
Dismisses contextual menu Escape
Navigates within contextual menu Arrow keys
Activates highlighted item in contextual menu and dismisses menu Enter, Return, spacebar

 


Radio Buttons

The following table lists the keyboard operation for radio buttons. For a discussion of the appearance and behavior of this component, see Radio Buttons.

Table  21 Keyboard Operation for Radio Buttons
Action
Keyboard Operation
Selects radio button Spacebar

 


Scrollbars

Users can operate scrollbars from the keyboard when keyboard focus is anywhere in the scroll pane that contains the scrollbar. For a discussion of the appearance and behavior of this component, see Scrollbars.

Table  22 Keyboard Operations for Scrollbars 
Action
Keyboard Operation
Moves view up one line Up arrow
Moves view down one line Down arrow
Moves up one view Page Up
Moves down one view Page Down
Moves to beginning of data Ctrl-Home
Moves to end of data Ctrl-End
Moves right one view minus one line Ctrl-PgDn
Moves left one view Ctrl-Pg Up

 


Sliders

The following table lists the keyboard operations for sliders. For details on this component, see Sliders.

Table  23 Keyboard Operations for Sliders
Action
Keyboard Operation
Changes value of slider Arrow keys
Moves to left/top value Home
Moves to right/bottom value End
Jumps in left/top direction (approximately 20% of the scale) Page Up, Ctrl-PgUp
Jumps in right/bottom direction (approximately 20% of the scale) Page Down, Ctrl-PgDn

 


Split Panes

The following table lists the keyboard operations for split panes. After users enter a split pane, pressing Tab cycles the focus to the components within the split pane. For a description of the appearance and behavior of this component, see Split Panes.

Table  24 Keyboard Operations for Split Panes 
Action
Keyboard Operation
Navigates between split panes and gives focus to last element that had focus Tab, F6
Gives focus to splitter bar F8
Changes location of splitter bar in splitter pane Arrow keys, Home, End

 


Tabbed Panes

The following table lists the keyboard operations for tabbed panes. For a description of the appearance and behavior of this component, see Tabbed Panes. When a tabbed pane initially gets focus, the focus goes to one of the tabs, and not to one of the content panes.

Table  25 Keyboard Operations for Tabbed Panes
Action
Keyboard Operation
Navigates through tabs Arrow keys
Moves from tab to its associated content pane Ctrl-down arrow
Moves from content pane to its associated tab Ctrl-up arrow
Moves to next or previous content pane Ctrl-PgDn or Ctrl-PgUp

 


Tables

The following table lists the keyboard operations for tables. For a description of the appearance and behavior of this component, see Tables.

Table  26 Keyboard Operations for Tables 
Action
Keyboard Operations
Moves focus up one cell Shift-Return
Moves focus down one cell Return
Moves focus left one cell Shift-Tab
Moves focus right one cell Tab
Deselects current selection and moves focus up one cell Up arrow
Deselects current selection and moves focus down one cell Down arrow
Scrolls up one view and gives focus to first visible cell in the current column Page Up
Scrolls down one view and gives focus to first visible cell in the current column Page Down
Scrolls left one view and gives focus to first visible cell in the current row Ctrl-PgUp
Scrolls right one view and gives focus to first visible cell in the current row Ctrl-PgDn
Moves focus and view to first cell in the current row Home
Moves focus and view to last cell in the current row End
Moves focus and view to first cell in the current column Ctrl-Home
Moves focus and view to last cell in the current column Ctrl-End
Allows editing in a cell without overwriting the information F2
Resets cell to the state it was in before it was edited Escape
Selects entire table Ctrl-A
Extends selection up one row Shift-up arrow
Extends selection down one row Shift-down arrow
Extends selection left one column Shift-left arrow
Extends selection right one column Shift-down arrow
Extends selection to beginning of row Shift-Home
Extends selection to end of row Shift-End
Extends selection to beginning of column Ctrl-Shift-Home
Extends selection to end of column Ctrl-Shift-End
Extends selection up one view Shift-PgUp
Extends selection down one view Shift-PgDn
Extends selection left one view Ctrl-Shift-PgUp
Extends selection right one view Ctrl-Shift-PgDn

 


Text Areas and Default and Styled Text Editor Kits

The following table lists the keyboard operations for text areas and the default and styled text editor kits. For details on the appearance and behavior of these components, see Text Areas, Default Editor Kit, and Styled Text Editor Kit.

Table  27 Keyboard Operations for Text Areas and Default and Styled Text Editor Kits 
Action
Keyboard Operation
Moves insertion point up one line Up arrow
Moves insertion point down one line Down arrow
Moves insertion point to the left one component or character Left arrow
Moves insertion point to the right one component or character Right arrow
Moves up one view Page Up
Moves down one view Page Down
Moves left one view Ctrl-PgUp
Moves right one view Ctrl-PgDn
Moves to beginning of line Home
Moves to end of row or line End
Moves to beginning of data Ctrl-Home
Moves to end of data Ctrl-End
Moves to next word Ctrl-right arrow
Moves to previous word Ctrl-left arrow
Selects all Ctrl-A, Ctrl-/
Deselects all Ctrl-\
Extends selection up Shift-up arrow
Extends selection down Shift-down arrow
Extends selection left Shift-left arrow
Extends selection right Shift-right arrow
Extends selection up one view Shift-PgUp
Extends selection down one view Shift-PgDn
Extends selection to the left one view Ctrl-Shift-PgUp
Extends selection to the right one view Ctrl-Shift-PgDn
Extends selection to beginning of line Shift-Home
Extends selection to end of line Shift-End
Extends selection to beginning of data Ctrl-Shift-Home
Extends selection to end of data Ctrl-Shift-End
Extends selection to next word Ctrl-Shift-right arrow
Extends selection to previous word Ctrl-Shift-left arrow

 


Text Fields

The following table lists the keyboard operations for text fields. For details on this component, see Text Fields.

Table  28 Keyboard Operations for Text Fields 
Action
Keyboard Operation
Moves insertion point one character to the right Right arrow
Moves insertion point one character to the left Left arrow
Moves insertion point to beginning of next word Ctrl-right arrow
Moves insertion point to beginning of previous word Ctrl-left arrow
Moves insertion point to beginning of field Home
Moves insertion point to end of field End
Submits text entry Enter, Return
Extends selection to beginning of line Shift-Home
Extends selection to end of line Shift-End
Extends selection one character to the left Shift-left arrow
Extends selection one character to the right Shift-right arrow
Extends selection to next word Shift-Ctrl-right arrow
Extends selection to previous word Shift-Ctrl-left arrow

 


Toggle Buttons

The following table lists the keyboard operation for toggle buttons. For details on this component, see Toggle Buttons.

Table  29 Keyboard Operation for Toggle Buttons
Action
Keyboard Operation
Toggles button on or off Spacebar

 


Tool Tips

The following table lists the keyboard operations for tool tips. For details on this component, see Tool Tips.

Table  30 Keyboard Operations for Tool Tips
Action
Keyboard Operation
Displays tool tip Ctrl-F1
Removes tool tip Escape, Ctrl-F1

 


Toolbars

The following table lists the keyboard operations for toolbars. For details on the appearance and behavior of this component, see Toolbars.

Table  31 Keyboard Operations for Toolbars
Action
Keyboard Operation
Navigates within toolbar Arrow keys
Activates toolbar Spacebar

 


Tree Views

The following table lists the keyboard operations for tree views. For details on the appearance and behavior of this component, see Tree Views.

Table  32 Keyboard Operations for Tree Views 
Action
Keyboard Operation
Expands current node Right arrow
Collapses current node Left arrow
Moves focus up one node Up arrow
Moves focus down one node Down arrow
Moves focus to first node in tree Home
Moves focus to last node in tree End
Moves up one view Page Up
Moves down one view Page Down
Moves left one view Ctrl-PgUp
Moves right one view Ctrl-PgDn
Selects all nodes in tree Ctrl-A, Ctrl-/
Deselects all Ctrl-\
Extends selection down Shift-down arrow
Extends selection up Shift-up arrow
Extends selection to beginning of tree Shift-Home
Extends selection to end of tree Shift-End
Extends selection up one view Shift-PgUp
Extends selection down one view Shift-PgDn
Extends selection right one view Ctrl-Shift-PgDn
Extends selection left one view Ctrl-Shift-PgUp



java.sun.com  :  Design Guidelines Previous  |  Next  |  Contents  |  Index  |  Search

Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.