Windows 8 touchpad gesture implementation guide

This topic contains guidance for implementing Windows 8 touchpad gestures.

This information applies to the following operating system:

  • Windows 8

Two-finger slide gesture (pan)

A two-finger pan should occur when the user places two fingers on the sensor and moves them in parallel simultaneously. As shown below, this can be either horizontally or vertically anywhere on the touchpad surface. A touchpad should handle pan gestures by two or more fingers, if the touchpad’s device sensor (and driver, if applicable) can reliably process slide gestures by more than two contacts. Optionally, a touchpad can support the horizontal and vertical pan gestures that use a single finger slide on the edges of the sensor surface, but the gesture should be turned off by default.

When processing a two-finger pan, the touchpad device should:

  • Issue horizontal or vertical wheel inputs, depending on the direction of travel of the fingers. The device should not change the scroll axis once it starts to scroll, until the user raises all fingers from the touchpad surface.
  • The scrolling direction of the content should be in the same direction that the fingers are traveling. That is, a far downward or leftward finger slide should result in positive tick counts for a vertical or horizontal wheel.
  • Accelerate or decelerate the wheel movement as the user moves their fingers faster or slower on the touchpad surface. This enables the user to pan more effectively and accurately.
  • Apply an inertia curve when the user releases their two fingers while moving. This enables the pan operation to feel and respond fluidly. The inertia curve should be stopped immediately if the finger(s) come down on the surface during the inertia phase. • Use higher wheel resolution to enable smoother and finer pan interactions.
  • Ensure the mouse curser does not move or alter its cursor icon during a two finger pan operation.

For more information about the mouse wheel implementations, see High-resolution mouse wheel.

Two-finger pinch gesture (zoom)

A two-finger zoom should occur when the user places two fingers on the sensor and moves them either away from each other (zoom in) or toward each other (zoom out), as shown below.

A touchpad should handle zoom gestures by two or more fingers if the touchpad’s device sensor (and driver, if applicable) can reliably process pinch gestures by two or more contacts.

When processing a two-finger zoom, the touchpad device should:

  • Issue Ctrl+vertical wheel input when the user performs the zoom gesture.
  • Accelerate or decelerate the wheel movement as the user moves their contact faster or slower on touchpad surface. This enables the user to zoom more effectively and accurately.
  • Use higher wheel resolution to enable smoother and finer zoom interactions.
  • Ensure the mouse cursor does not move or alter its cursor icon during a two-finger zoom operation.
  • Disable two-finger pinch gesture if the sensor surface is smaller than 90mm (w) x 55mm (h)

For more information about the mouse wheel implementations, see High-resolution mouse wheel.

Device firmware and third-party drivers

Windows 8 touchpad gestures can be implemented in a third-party driver. However, where possible, a Windows 8 touchpad should implement a gesture recognition system in the device firmware so that the device functions as a standard HID mouse and keyboard without the need for third-party drivers.

  • All touchpad devices must meet any applicable requirements for pointing devices as described in the Windows Hardware Certification Requirements.
  • Device connection should be made via Universal Serial Bus (USB), PS/2, or I2C bus as a standard mouse (pointing) device. In the case of a PS/2 touchpad, it must support a unique device ID, to enable OEMs and touchpad manufacturers to submit their software on Windows Update.
  • If implemented, any included drivers must conform to applicable Windows Hardware Certification Kit requirements.

A third-party driver should be made available through Windows Update so that users are automatically updated or notified with the latest driver. Microsoft recommends that any necessary drivers be made available to Windows Update as an “Optional” update. To obtain the latest information on the correct hardware IDs for mobile PCs with PS/2 devices, see Hardware IDs for PS/2 Input Devices on Laptops.

Input injection

The preferred method of input for Windows 8 touchpad gestures is from the device firmware or from the device driver. When a third-party user-mode executable (outside of UMDF / KMDF driver components) simulates a mouse wheel or keyboard shortcuts, it should use the SendInput function. It must not use SendMessage or PostMessage functions, or input simulation may fail in applications unexpectedly because these functions often bypass necessary input procedures. On Windows RT, long-standing user mode binary or service is not supported – all touchpad functions should be implemented in the driver itself or in the firmware.

The touch injection API (the InjectTouchInput function) is designed for remote desktop and the touch emulator in Microsoft Visual Studio 2012, but it is not suitable for Windows 8 touchpad implementations. For more details, see A note on the touch injection API for Windows 8 touchpads.

Design recommendations for Windows 8 touchpads

 

 

Send comments about this topic to Microsoft