Blame hig/C/pointer-and-touch-input.page

Packit 1470ea
Packit 1470ea
      type="topic"
Packit 1470ea
      id="pointer-and-touch-input">
Packit 1470ea
Packit 1470ea
  <info>
Packit 1470ea
    <credit type="author">
Packit 1470ea
      <name>Allan Day</name>
Packit 1470ea
      <email>aday@gnome.org</email>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit type="author">
Packit 1470ea
      <name>Jakub Steiner</name>
Packit 1470ea
    </credit>
Packit 1470ea
    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
Packit 1470ea
    <desc>Mouse, touchpad and touchscreen interaction.</desc>  
Packit 1470ea
  </info>
Packit 1470ea
Packit 1470ea
<title>Pointer and touch input</title>
Packit 1470ea
Packit 1470ea

Pointer and touch input are two of the primary means through which users will interact with your application.

Packit 1470ea
Packit 1470ea
<section id="pointer-input">
Packit 1470ea
<title>Pointer input</title>
Packit 1470ea
Packit 1470ea

A pointing device is any input device that allows the manipulation of a pointer - typically represented as an arrow, and often called a cursor - on screen. While mice and touchpads are the most common, there are a wide variety of such devices, including graphics tablets, track balls, track points and joysticks.

Packit 1470ea
Packit 1470ea
<section id="primary-and-secondary-buttons">
Packit 1470ea
<title>Primary and secondary buttons</title>
Packit 1470ea
Packit 1470ea

Mice and touchpads often have two main buttons. One of these acts as the primary button, and the other acts as the secondary button. Typically, the left button is used as the primary button and the right button is used as the secondary button. However, this order is user-configurable and does not translate to touchscreen input. These guidelines therefore refer to primary and secondary action, rather than left and right.

Packit 1470ea
Packit 1470ea

Use the primary action for selecting items and activating controls. The secondary action can be used for accessing additional options, typically through a context menu.

Packit 1470ea
Packit 1470ea

Do not depend on input from secondary or other additional buttons. As well as being physically more difficult to click, some pointing devices and many assistive technology devices only support or emulate the primary button.

Packit 1470ea
Packit 1470ea

Press and hold should be used to simulate the secondary button on single button pointing devices. Therefore, do not use press and hold for other purposes.

Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="general-guidelines">
Packit 1470ea
<title>General guidelines</title>
Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

Double click should not be used, since it is undiscoverable, and translates poorly to touch input.

</item>
Packit 1470ea
<item>

If present on the mouse, the scrollwheel should scroll the window or control under the pointer, if it supports scrolling. Initiating scrolling in this way should not move keyboard focus to the window or control being scrolled.

</item>
Packit 1470ea
<item>

Do not require the use of chording (pressing multiple mouse buttons simultaneously) for any operations.

</item>
Packit 1470ea
<item>

Do not require the use of multiple (triple- or quadruple-) clicking actions for any operations, unless you also provide an accessible alternative method of performing the same action.

</item>
Packit 1470ea
<item>

Allow all mouse operations to be cancelled before their completion. Pressing <key>Esc</key> should cancel any mouse operation in progress, such as dragging and dropping a file in a file manager, or drawing a shape in a drawing application.

</item>
Packit 1470ea
<item>

Do not refer to particular mouse buttons in your interface unless absolutely necessary. Not everybody will be using a conventional mouse with left, middle and right buttons, so any text or diagrams that refer to those may be confusing.

</item>
Packit 1470ea
</list>
Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="mouse-and-keyboard-equivalents">
Packit 1470ea
<title>Mouse and keyboard equivalents</title>
Packit 1470ea
Packit 1470ea

Ensure that every operation in your application that can be done with the mouse can also be done with the keyboard. The only exceptions to this are actions where fine motor control is an essential part of the task. For example, controlling movement in some types of action games, or freehand painting in an image-editing application.

Packit 1470ea
Packit 1470ea

If your application allows items to be selected, the following equivalent actions should be in place.

Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea

Action

Packit 1470ea

Mouse

Packit 1470ea

Keyboard

Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea

Open an item

Packit 1470ea

Primary button

Packit 1470ea

<key>Space</key>

Packit 1470ea
Packit 1470ea
Packit 1470ea

Add/remove item from selection

Packit 1470ea

<key>Ctrl</key> and primary button

Packit 1470ea

<keyseq><key>Ctrl</key><key>Space</key></keyseq>

Packit 1470ea
Packit 1470ea
Packit 1470ea

Extend selection

Packit 1470ea

<key>Shift</key> and primary button

Packit 1470ea

<key>Shift</key> in combination with any of the following: <key>Space</key> <key>Home</key> <key>End</key> <key>PageUp</key> <key>PageDown</key>

Packit 1470ea
Packit 1470ea
Packit 1470ea

Change selection

Packit 1470ea

Primary button

Packit 1470ea

Any of the following: <key>←</key> <key>↑</key> <key>→</key> <key>↓</key> <key>Home</key> <key>End</key> <key>PageUp</key> <key>PageDown</key>

Packit 1470ea
Packit 1470ea
Packit 1470ea

Select all

Packit 1470ea

Primary button on first item, then primary button and <key>Shift</key> on the last item

Packit 1470ea

<keyseq><key>Ctrl</key><key>A</key></keyseq>

Packit 1470ea
Packit 1470ea
Packit 1470ea

Deselect all

Packit 1470ea

Primary click on the container background

Packit 1470ea

<keyseq><key>Shift</key><key>Ctrl</key><key>A</key></keyseq>

Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="touch-input">
Packit 1470ea
<title>Touch input</title>
Packit 1470ea
Packit 1470ea

Touch screens are also an increasingly common part of modern computer hardware, and applications created with GTK+ are likely to be used with hardware that incorporates a touch screen. To make the most of this hardware, and to conform to users’ expectations, it is therefore important to consider touch input as a part of application design.

Packit 1470ea
Packit 1470ea
<section id="application-touch-conventions">
Packit 1470ea
<title>Application touch conventions</title>
Packit 1470ea
Packit 1470ea

Using touch input consistently with other applications will allow users to easily learn how to use your application with a touch screen. The following conventions are recommended, where relevant.

Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea

Action

Packit 1470ea

Description

Packit 1470ea

Result

Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea

Tap

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/png" src="figures/touch/tap.svg"/>
Packit 1470ea

Tap on an item.

Packit 1470ea

Primary action. Item opens - photo is shown full size, application launches, song starts playing.

Packit 1470ea
Packit 1470ea
Packit 1470ea

Press and hold

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/png" src="figures/touch/tap-and-hold.svg"/>
Packit 1470ea

Press and hold for a second or two.

Packit 1470ea

Secondary action. Select the item and list actions that can be performed.

Packit 1470ea
Packit 1470ea
Packit 1470ea

Drag

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/png" src="figures/touch/drag.svg"/>
Packit 1470ea

Slide finger touching the surface.

Packit 1470ea

Scrolls area on screen.

Packit 1470ea
Packit 1470ea
Packit 1470ea

Pinch or stretch

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/png" src="figures/touch/pinch-or-stretch.svg"/>
Packit 1470ea

Touch surface with two fingers while bringing them closer or further apart.

Packit 1470ea

Changes the zoom level of the view (eg. Maps, Photos).

Packit 1470ea
Packit 1470ea
Packit 1470ea

Double tap

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/png" src="figures/touch/double-tap.svg"/>
Packit 1470ea

Tap twice in quick succession.

Packit 1470ea

Stepped zoom in.

Packit 1470ea
Packit 1470ea
Packit 1470ea

Flick

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/png" src="figures/touch/flick.svg"/>
Packit 1470ea

Very quick drag, losing contact with the surface without slowing movement.

Packit 1470ea

Removes an item.

Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="system-touch-conventions">
Packit 1470ea
<title>System touch conventions</title>
Packit 1470ea
Packit 1470ea

In GNOME 3, a number of touch gestures are reserved for use by the system. These should be avoided by applications.

Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea

Edge drag

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/svg" src="figures/touch/edge-drag.svg"/>
Packit 1470ea

Slide finger starting from a screen edge.

Packit 1470ea

Top-left edge opens the application menu.

Packit 1470ea

Top-right edge opens the system status menu.

Packit 1470ea

Left edge opens the Activities Overview with the application view visible.

Packit 1470ea
Packit 1470ea
Packit 1470ea

Three finger pinch

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/svg" src="figures/touch/3-finger-pinch.svg"/>
Packit 1470ea

Bring three or more fingers closer together while touching the surface.

Packit 1470ea

Opens the Activities Overview.

Packit 1470ea
Packit 1470ea
Packit 1470ea

Four finger drag

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/svg" src="figures/touch/4-finger-drag.svg"/>
Packit 1470ea

Drag up or down with four fingers touching the surface.

Packit 1470ea

Switches workspace.

Packit 1470ea
Packit 1470ea
Packit 1470ea

Three finger hold and tap

Packit 1470ea
Packit 1470ea
Packit 1470ea
<media type="image" mime="image/svg" src="figures/touch/3-finger-hold-and-tap.svg"/>
Packit 1470ea

Hold three fingers on the surface while tapping with the fourth.

Packit 1470ea

Switches application.

Packit 1470ea
Packit 1470ea
Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
</section>
Packit 1470ea
</page>