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)
- Type: Binary Value (
REG_BINARY) - Purpose: Stores user interface preferences as bit flags. Active window tracking is controlled by the first bit (Bit 0) of the first byte.
- How to Configure:
- Enable Tracking: Modify the first byte so that the
least significant bit is set to
1. For example, if the default first byte is9E, change it to9F. If it isDE, change it toDF. - Disable Tracking: Set the least significant bit of
the first byte to
0(e.g., change9Fback to9E).
- Enable Tracking: Modify the first byte so that the
least significant bit is set to
2.
ActiveWndTrkTimeout (Configures Hover Delay)
- Type: DWORD (32-bit) Value
(
REG_DWORD) - Purpose: Determines the delay time (in milliseconds) before the window beneath the cursor gains focus.
- How to Configure:
- Double-click
ActiveWndTrkTimeout. - Select Decimal as the base.
- Enter the desired delay in milliseconds (e.g.,
0for instantaneous activation, or500for a half-second delay).
- Double-click
Step-by-Step Configuration Guide
Press
Win + R, typeregedit, and press Enter to open the Registry Editor.Navigate to:
HKEY_CURRENT_USER\Control Panel\DesktopLocate and double-click the
UserPreferencesMaskbinary value.Edit the first byte to enable tracking (e.g., change
9Eto9F) and click OK.Locate the
ActiveWndTrkTimeoutDWORD value. If it does not exist, right-click an empty space, select New > DWORD (32-bit) Value, and name itActiveWndTrkTimeout.Double-click
ActiveWndTrkTimeout, choose the Decimal base, set your preferred delay in milliseconds, and click OK.Restart your computer or sign out and sign back into your Windows user account for the changes to take effect.