Precision touchpad tuning (touchpad-tuning-guidelines)
There are several approaches an OEM can take to adjust the default touchpad experience on their Windows-based device. The default values meet the needs of most users, so they should only be adjusted if they don't provide the specific experience that the OEM wants (and in the case of HorizontalOffset / SpaceBarOffset, which should both always be set).
Note
Be aware that serious problems can occur if the registry is modified incorrectly. Ensure these steps are followed carefully. For additional protection, back up the registry before modification. See How to back up and restore the registry in Windows.
The tunable registry values described below are all located in the touchpad device's HKR hardware key:
- Introduction to registry keys for drivers
- Device Driver INF AddReg Directive
- Opening a Device's Hardware Key
HKEY_LOCAL_MACHINE (HKLM)
On versions of Windows prior to version 1903, only the global location was supported. The default global location is:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\PrecisionTouchPad
On Windows, version 1903 and later, each of the registry values in this guide are checked for under the HKR key first, and then under the HKEY_LOCAL_MACHINE
key next if not found. This enables the ability to override defaults in HKLM by using the HKR location on a per-value basis.
Accidental Activation Prevention
AAP is a feature of Precision Touchpads that suppresses certain actions like mouse moves and taps for a short time after keyboarding events. The specific timeouts depend on the type of action and the region of the touchpad receiving input, as well as the user setting called Touchpad sensitivity found in Touchpad settings. More sensitive means less time is spent suppressing input after keyboarding events. Maximum sensitivity means AAP timeouts are zero and AAP is not in effect.
Tunable parameters
Windows defines two classes of "Curtain" regions on the touchpad to help prevent accidental input when users are resting their hands on the keyboard or touchpad during normal use. This splits the touchpad into three regions:
- High sensitivity region: input suppression is minimal in this region
- Curtain region: input may be suppressed for some time in this region
- Supercurtain region: certain kinds of input like taps are almost always suppressed when the input originates with this region
Even when specifying curtain sizes explicitly, it is strongly recommended to provide the physical touchpad positioning information via SpaceBarOffset
and HorizontalOffset
. This is necessary for Windows to make decisions around a consistent and predictable user experience when switching between keyboarding and pointing. For more information, see the Windows Precision Touchpad Device Integration guide.
Curtains
If the three values CurtainLeft
, CurtainRight
, and CurtainTop
are found, Curtains will be constructed using these as distances from the respective edges. If all three of these values are not found, the legacy configuration (see Legacy Curtains below) will be used next, followed by defaults.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
CurtainTop | DWORD | Himetric | 0+ | 0 | Windows 10, version 1903+ |
CurtainLeft | DWORD | Himetric | 0+ | 0 | Windows 10, version 1903+ |
CurtainRight | DWORD | Himetric | 0+ | 0 | Windows 10, version 1903+ |
CurtainBottom (Optional) | DWORD | Himetric | 0+ | 0 | Windows 10, version 1903+ |
Curtains (Implicit)
The legacy algorithm for configuring curtains changes curtain sizes depending on the vertical location of touchpad event, and isn't as flexible for customization. Going forward, it is recommended that only SpaceBarOffset
and HorizontalOffset
values be set, and curtains be otherwise configured through CurtainTop
, etc. described above.
The high sensitivity region is intended to stay responsive even during or immediately after keybaord use.
The width of the region on either side of the center line (Zone Width in the diagram above) is defined as:
SpacebarOffset + AAPNonCurtainBaseWidth
Note that this means the total width of the region is twice this value. SpacebarOffset
is taken into account for the region, since proximity to the keyboard increases risk of palm contact.
The height of the region is defined in relation to the space bar and stretches to the bottom of the touchpad. Distance to the top of the zone is defined as:
AAPNonCurtainTop - SpaceBarOffset
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
SpaceBarOffset | DWORD | Himetric | 0+ | 1000 | Windows 8.1 + |
HorizontalOffset | DWORD | Himetric | Any | 0 | Windows 8.1 - Windows 10, version 1511 for 0+ range, Windows 10, version 1511+ for any range |
HorizontalOffsetIsNeg | DWORD | Himetric | 0-1 | 0 | Windows 8.1 +, deprecated in Windows 10, version 1511 |
AAPNonCurtainTop | DWORD | Himetric | 0+ | 1500 | Windows 10, version 1607+ |
AAPNonCurtainBaseWidth | DWORD | Himetric | 0+ | 1500 | Windows 10, version 1607+ |
Super Curtains
The restricted sensitivity zone is the lowest sensitivity region of the touchpad. It is designed for the region of the touchpad where users would not leave fingers during intentional use. Note these are very small by default and should only be widened for very large devices.
The top, left, and right zones' sizes are defined independently as a distance from their respective edge. They use the registry keys shown in the following table.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
SuperCurtainTop | DWORD | Himetric | 0+ | 100 | Windows 10, version 1511+ |
SuperCurtainLeft | DWORD | Himetric | 0+ | 100 | Windows 10, version 1511+ |
SuperCurtainRight | DWORD | Himetric | 0+ | 100 | Windows 10, version 1511+ |
SuperCurtainBottom | DWORD | Himetric | 0+ | 100 | Windows 10, version 1903+ |
Right-click zone
The following registry values allow the configuration of the right click zone. The height is expressed by RightClickZoneHeight
as a percentage of the height of the entire touchpad measured from the bottom edge. RightClickZoneWidth
is also a percentage of the width, measured from the right edge in right-handed, and the left edge in left-handed configurations when the swap mouse buttons option is enabled.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
RightClickZoneHeight | DWORD | Percent | 1-100 | 25 | Windows 10, version 1507+ |
RightClickZoneWidth | DWORD | Percent | 1-100 | 50 | Windows 10, version 1507+ |
Suppressing Accidental Activation Protection
Setting the following key is equivalent to the user choosing "Most sensitive", which disables AAP. When this key is set, the Touchpad sensitivity setting in Windows Settings (shown above) has no effect.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\AAPDisabled
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
AAPDisabled | DWORD | n/a | 0-1 | 0 | Windows 10, version 1511+ |
Detecting keyboard mouse collection as a non-mouse
Windows provides a registry setting that lets you exempt specific devices. This can be found in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\IgnoredExternalMice
Structuring this key is similar to forcing a legacy touchpad to be enabled. See legacy touchpad forced detection for more details.
HKEY_CURRENT_USER (HKCU)
OEMs are able to change the user's touchpad settings by modifying the below HKCU registry values. All values are under the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad
. To change the defaults used when a new user profile is created, modifications should be made to the registry hive located at %SystemDrive%\Users\Default\NTUSER.DAT
.
Leave touchpad on when a mouse is connected
This setting specifies whether the touchpad is allowed to remain active when an external mouse is present. When inactive, any input produced by the touchpad is ignored.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
LeaveOnWithMouse | DWORD | n/a | 0-1 | 1 | Windows 10, version 1511+ |
Cursor speed
This setting specifies the rate at which the mouse motion produced by the touchpad moves the cursor. Valid values are 1-20, inclusive. The user interface for this setting limits the range to 2-20 with a step of 2.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
CursorSpeed | DWORD | n/a | 1-20 | 10 | Windows 10, version 1511+ |
Click sensitivity
This setting specifies the relative sensitivity of the touchpad’s haptic click detection, if supported. Valid values are 0-100, inclusive. The user interface for this setting limits the range to 0-100 with a step of 50. This is the user-facing setting for the "Button Press Threshold" feature report.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
ClickForceSensitivity | DWORD | Percent | 0-100 | 50 | Windows 11, build 26027+ |
"Touchpad feedback" section
Windows provides the ability to modify settings in the Touchpad feedback section of Touchpad settings.
Feedback enabled
This setting specifies whether haptic feedback is enabled on touchpads where it is supported.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
FeedbackEnabled | DWORD | n/a | 0-1 | 1 | Windows 11 |
Note
To ensure a great user experience, haptic feedback should be enabled by default. Therefore this value should remain set to 1
.
Intensity
This setting specifies the relative intensity of the touchpad’s haptic feedback, if supported. Valid values are 0-100, inclusive. The user interface for this setting limits the range to 0-100 with a step of 25. This is the user-facing setting for the "Haptic Intensity" feature report.
Note
To ensure a great user experience, haptic feedback should be enabled by default. Therefore this value should be set to a non-zero value.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
FeedbackIntensity | DWORD | Percent | 0-100 | 50 | Windows 11 |
"Taps" section
Windows provides the ability to modify settings in the Taps section of Touchpad settings.
Touchpad sensitivity
This setting specifies the touchpad’s sensitivity level. The more sensitive the touchpad, the less suppression of mouse input generation occurs after keyboard activity. Lower values correspond to higher sensitivity (meaning 0 indicates highest sensitivity).
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
AAPThreshold | DWORD | n/a | 0-4 | 2 | Windows 10, version 1511+ |
Tap with a single finger to single-click
This setting specifies whether single-finger taps are enabled.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
TapsEnabled | DWORD | n/a | 0-1 | 1 | Windows 10, version 1511+ |
Tap with two fingers to right-click
This setting specifies whether two-finger taps are enabled.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
TwoFingerTapEnabled | DWORD | n/a | 0-1 | 1 | Windows 10, version 1511+ |
Tap twice and drag to multi-select
This setting specifies whether the tap-and-drag gesture is enabled.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
TapAndDrag | DWORD | n/a | 0-1 | 1 | Windows 10, version 1511+ |
Press the lower right corner of the touchpad to right-click
This setting specifies whether pressing the touchpad in its bottom-right corner results in a right-click being produced instead of a left click. If the user has swapped their left and right mouse buttons (GetSystemMetrics(SM_SWAPBUTTON)
is true), the right-click zone is mirrored horizontally to the bottom-left corner of the touchpad.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
RightClickZoneEnabled | DWORD | n/a | 0-1 | 1 | Windows 10, version 1511+ |
"Scroll & zoom" section
Windows provides the ability to modify settings with the Scroll & zoom section of Touchpad settings.
Note
There is currently no way to modify the scrolling or zooming speed of a touchpad.
Drag two fingers to scroll
This setting specifies whether two-finger panning is enabled.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
PanEnabled | DWORD | n/a | 0-1 | 1 | Windows 10, version 1511+ |
Scroll direction
This setting specifies whether the direction content scrolls via two-finger panning is reversed. In the default state, upwards motion of contacts on the touchpad results in content scrolling downward and leftwards motion of contacts results on content scrolling rightwards.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
ScrollDirection | DWORD | n/a | 0-1 | 0 | Windows 10, version 1511+ |
Pinch to zoom
This setting specifies whether two-finger zooming is enabled.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
ZoomEnabled | DWORD | n/a | 0-1 | 1 | Windows 10, version 1511+ |
Settings with no user interface
The following settings are supported by Windows but are not exposed to the user in the Settings application.
Mouse acceleration
This setting specifies whether the mouse motion produced by the touchpad honors the user’s mouse acceleration setting as returned by SystemParametersInfo(SPI_GETMOUSE)
. If 0, the mouse motion will always have acceleration applied.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
HonorMouseAccelSetting | DWORD | n/a | 0-1 | 0 | Windows 10, version 1511+ |
Right click zone width
This setting specifies the relative width of the touchpad’s right-click zone. Valid values are 0-100, inclusive. If non-zero, it overrides the device’s configuration.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
RightClickZoneWidth | DWORD | Percent | 0-100 | 0 | Windows 11, build 26027+ |
Right click zone height
This setting specifies the relative height of the touchpad of the touchpad’s right-click zone. Valid values are 0-100, inclusive. If non-zero, it overrides the device’s configuration.
Registry Value | Type | Units | Range | Default | Availablity |
---|---|---|---|---|---|
RightClickZoneHeight | DWORD | Percent | 0-100 | 0 | Windows 11, build 26027+ |
Dynamically querying and modifying settings
As of Windows 11, build 26027, the user's touchpad settings can be queried and modified dynamically via the SystemParametersInfo
API. For example:
// Get the user's touchpad settings.
TOUCHPAD_PARAMETERS params = {};
params.versionNumber = TOUCHPAD_PARAMETERS_LATEST_VERSION;
RETURN_IF_WIN32_BOOL_FALSE(
::SystemParametersInfo(SPI_GETTOUCHPADPARAMETERS, sizeof(params), ¶ms, 0 /*fWinIni*/));
// Override the touchpad's right-click zone to have a 50% width and 33% height.
// NOTE: changing user settings should only be performed in response to explicit user intent.
params.rightClickZoneWidth = 50;
params.rightClickZoneHeight = 33;
RETURN_IF_WIN32_BOOL_FALSE(
::SystemParametersInfo(SPI_SETTOUCHPADPARAMETERS, sizeof(params), ¶ms, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE));
As with any call to SystemParametersInfo
, the process must be running under the user's account in order for the settings to be correctly queried or modified.