Windows Registry Setting for Active Window Tracking

Active window tracking, commonly referred to as “focus follows mouse” or X-Mouse behavior, allows a window to automatically gain focus when the mouse pointer hovers over it. This article outlines the specific Windows Registry values located in Regedit that control active window tracking, how to configure the hover delay, and the steps required to apply these changes across modern versions of Windows.


The Registry Path

The settings that govern active window tracking are located in the user-specific desktop configuration path:

HKEY_CURRENT_USER\Control Panel\Desktop

Key Registry Values

Two primary values control active window tracking behavior:

1. UserPreferencesMask (Enables or Disables Tracking)

2. ActiveWndTrkTimeout (Configures Hover Delay)


Step-by-Step Configuration Guide

  1. Press Win + R, type regedit, and press Enter to open the Registry Editor.

  2. Navigate to:

    HKEY_CURRENT_USER\Control Panel\Desktop
  3. Locate and double-click the UserPreferencesMask binary value.

  4. Edit the first byte to enable tracking (e.g., change 9E to 9F) and click OK.

  5. Locate the ActiveWndTrkTimeout DWORD value. If it does not exist, right-click an empty space, select New > DWORD (32-bit) Value, and name it ActiveWndTrkTimeout.

  6. Double-click ActiveWndTrkTimeout, choose the Decimal base, set your preferred delay in milliseconds, and click OK.

  7. Restart your computer or sign out and sign back into your Windows user account for the changes to take effect.