Keyboards are a common way to interact with user interfaces. They provide a convenient and effective means to use applications in a variety of situations, and can be faster and more efficient than other input devices. Keyboards are also vital for visually-impaired people or those with mobility impairments.
You should ensure that all the functionality provided by your application can be accessed using a keyboard. Trying to use your application with only a keyboard is a great way to test this.
Keyboard interaction has three aspects in GNOME and GTK+: navigation, access keys, and shortcut keys. Search is another, additional aspect.
Access keys allow someone to operate labelled controls by using
Where possible, all labelled components should have an access key.
Choose access keys that are easy to remember. Normally this means using the first letter of the label. If the label has more than one word, the first letter of one of its other words can also be used. Additionally, if another letter provides a better association (for example: “x” in “Extra Large”) , consider using that letter instead.
Avoid assigning access keys to “thin” letters (such as lowercase i or l), or letters with descenders (such as lowercase g or y), unless it is unavoidable. The underline is sometimes not as clear with these characters.
If the choice of access keys is difficult, assign access keys to the most frequently-used controls first. If the first letter is not available, choose an easy to remember consonant from the label, for example, “p” in “Replace”. Only assign vowels once no consonants are available.
Be aware that access keys have to be translated together with the strings that they are taken from, so even if there are no conflicts in your native language, they may occur in translations.
Shortcut keys provide convenient access to common operations. They can be either single keys or combinations of several key presses (typically a modifier in combination with a regular key)
Do not assign system-level shortcut keys for use in your application. See below for details on these.
Use the standard GNOME shortcut keys (see below) if your application supports those functions. This ensures consistency between GNOME applications and aids discoverability.
Assign shortcut keys to the most commonly-used actions in your application. However, do not try to assign a keyboard shortcut to everything.
Try to use
New shortcut keys should be as mnemonic as possible, as these will be easier to learn and remember. For example,
Shortcuts that can be easily used with one hand are preferable for common operations.
Do not use
The following system shortcuts should not be overridden by applications.
GNOME 3 makes exclusive use of
Function |
Shortcut |
Legacy Shortcut |
Description |
Activities Overview |
None |
Opens and closes the Activities Overview |
|
Applications View |
None |
Opens and closes the applications view of the Activities Overview |
|
Message Tray |
None |
Toggles the visibility of the Message Tray. |
|
Lock |
None |
Locks the system by blanking the screen and requiring a password to unlock, if one has been set. |
|
Switch application |
Switches focus to the next/previous application |
||
Switch windows |
Switch focus to the next or previous secondary window associated with the application |
||
Maximize the focused window |
|||
Restores the focused window to its previous state |
|||
Hide the focused window |
|||
Switch system area |
None |
Switches focus to the primary areas of the system: windows, top bar, message tray |
|
Power Off |
None |
Prompts the user to power off the system. This shortcut is typically disabled by default. |
|
Window menu |
None |
Opens the window menu for the current window |
|
None |
Closes the focused window |
||
None |
Move the focused window |
||
None |
Resize the focused window |
In addition, the shortcuts for Unicode character entry should also be avoided. This includes
This section details common application keyboard shortcuts. With the exception of application shortcuts, these shortcuts only need to be followed when the corresponding action is included in your application. Standard shortcuts can be assigned to other actions if the standard action is not available.
This section also provides guidance on standard menu items in a menu bar, should one be used.
Standard application keyboard shortcuts and menu items. These application shortcuts should not be reassigned to other actions, even when the corresponding action is not provided by your application.
Label |
Shortcut |
Description |
Opens the default help browser on the contents page for the application. |
||
None |
Opens the About dialog for the application. Use the standard GNOME 3 dialog for this. |
|
Closes the application, including all application windows. |
Standard file keyboard shortcuts and menu items.
Label |
Shortcut |
Description |
Creates a new content item, often (but not always) in a new primary window or tab. If your application can create a number of different types of document, you can make the |
||
Opens an existing content item, often by presenting the user with a standard |
||
None |
A submenu which contains a list of no more than six recently used files, ordered according to most recently used. |
|
Saves the current content item. If the document already has a filename associated with it, save the document immediately without any further interaction from the user. If there are any additional options involved in saving a file, prompt for these first time the document is saved, but subsequently use the same values each time until the user changes them. If the document has no current filename or is read-only, selecting this item should be the same as selecting |
||
Saves the content item with a new filename. Present the user with the standard |
||
None |
Prompts the user to enter a filename, with which a copy of the document is then saved. Do not alter either the view or the filename of the original document. All subsequent changes are still made to the original document until the user specifies otherwise, for example by choosing the Like the |
|
None |
Allows the user to control print-related settings. Present the user with a dialog allowing the user to set such options as portrait or landscape format, margins, and so on. |
|
Shows the user what the printed document will look like. Present a new window containing an accurate representation of the appearance of the document as it would be printed. |
||
Prints the current document. Present the user with a dialog allowing them to set options like the page range to be printed, the printer to be used, and so on. The dialog must contain a button labelled |
||
Provides the user a means to attach or send the current document as an email or email attachment, depending on its format. You may provide more than one |
||
Opens the document’s |
||
Closes the current tab or window. If the window uses tabs and there is only one open, the shortcut should close the window. |
Standard edit keyboard shortcuts and menu items.
Label |
Shortcut |
Description |
Reverts the effect of the previous action. |
||
Performs the next action in the undo history list, after the user has moved backwards through the list with the |
||
Removes the selected content and places it onto the clipboard. Visually, remove the content from the document in the same manner as |
||
Copies the selected content onto the clipboard. |
||
Inserts the contents of the clipboard into the content item. When editing text, if there is no current selection, use the caret as the insertion point. If there is a current selection, replace it with the clipboard contents. |
||
Inserts a non-default representation of the clipboard contents. Open a dialog presenting a list of the available formats from which the user can select. For example, if the clipboard contains a PNG file copied from a file manager, the image may be embedded in the document, or a link to the file inserted so that changes to the image on disk are always reflected in the document. |
||
Creates a duplicate copy of the selected object. |
||
Removes the selected content without placing it on the clipboard. |
||
Selects all content in the current document. |
||
Deselects all content in the current document. Only provide this item in situations when no other method of undoing selection is possible or apparent to the user. For example, in complex graphics applications where selection and deselection is not usually possible simply by using the cursor keys. Note: Do not provide |
||
Displays a user interface for allowing the user to search for specific content in the current content item or page. |
||
Selects the next instance of the last Find term in the current document. |
||
Selects the previous instance of the last |
||
Displays a user interface allowing the user to find specific content and replace each occurrence. |
View keyboard shortcuts and menu items.
Label |
Shortcut |
Description |
None |
Shows content as a grid of icons. This is a radio button menu item. |
|
None |
Shows content as a list. This is a radio button menu item. |
|
None |
Specifies the criteria by which content should be sorted. Can open a preference dialog, popover, or sub-menu. |
|
None |
Allows content to be filtered, by opening a popover, drop down, or dialog. |
|
Zooms in, making content appear larger. |
||
Zooms out, making content appear smaller. |
||
Resets the zoom level back to the default value. |
||
None |
Makes the document fill the window. |
|
Redraws the current view of the document, checking the data source for changes first. For example, checks the web server for updates to the page before redrawing it. |
Standard format keyboard shortcuts and menu items.
Label |
Shortcut |
Description |
None |
Sets the style attributes of the selected text or objects either individually or to a named, predefined style. |
|
None |
Sets the font properties of the selected text or objects. |
|
None |
Sets the properties of the selected paragraph. |
|
Toggles the boldness of the current text selection. If some of the selection is currently bold and some is not, this command should bolden the selected text. |
||
Toggles the italicisation of the current text selection on or off. If some of the selection is currently italicized and some is not, this command should italicise the selected text. |
||
Toggles underlining of the current text selection. If some of the selection is currently underlined and some is not, this command should underline the selected text. |
||
None |
Sets the properties of the selected table cells. |
|
None |
Sets the properties of the selected list, or turns the selected paragraphs into a list if they are not already formatted as such. |
|
None |
Sets the properties of all or selected layers of a multi-layered document. |
|
None |
Sets the properties of all or selected pages of the document. |
Standard bookmark keyboard shortcuts and menu items.
Label |
Shortcut |
Description |
Adds a bookmark for the current location. Do not pop up a dialog asking for a title or location for the bookmark, instead choose sensible defaults (such as the document’s title or filename as the bookmark name) and allow the user to change them later using the |
||
Allows the user to edit their bookmarks. |
||
Bookmark List |
None |
Displays the user’s bookmarks. |
Standard navigation keyboard shortcuts and
Label |
Shortcut |
Description |
Navigates to the previous location. |
||
Navigates to the next location in the navigation history. |
||
Navigates to the parent content item, document, page or section. |
||
Navigates to a starting page defined by the user or the application. |
||
Allows the user to specify a URI to navigate to. |
||
Navigates to the previous page in the document. |
||
Navigates to the next page in the document. |
||
None |
Allows the user to specify a page number to be navigated to. Text-based applications may also include a |
|
Navigates to the first page in the document. |
||
Navigates to the last page in the document. |
Standard
Label |
Shortcut |
Description |
None |
Saves all open documents. If any documents have no current filename, prompt for a filename for each one in turn using the standard |
|
None |
Closes all open documents. If there are any unsaved changes in any documents, post a confirmation alert for each one in turn. |
|
List of windows |
None |
Each menu item raises the corresponding window to the top of the window stack. |