Configure “focus follows mouse” behavior for Windows 8.1

Many people do not know this, but there are actually several different focus models for how windows get focused and/or raised in operating systems’ graphical window environments.

Window environments in Linux generally have these options readily configurable to the user, but unfortunately Microsoft Windows has only a limited option which can be found under Control Panel -> Ease of Access Center -> Make the mouse easier to use -> Activate a window by hovering over it with the mouse option.

However when this option is enabled, windows are not only focused when the mouse hovers over them, they are also raised. There are good reasons why one would want to focus windows but not raise them. In fact it occurs in most cases that this behavior is preferred over having them automatically raised. Automatic raising of windows when they are hovered over – and hence focused with the option enabled – can be annoying. Its much better to have the option to click on a window once its focused to actually raise it to the foreground if that’s what’s really desired.

It turns out that to configure this particular behavior with Windows 8.1 is a little bit tricky. Shame on Microsoft for not making this easier. Anyhow, I found a helpful post on how to configure this in a blog post at winaero.com: Turn on Xmouse active window tracking (focus follows mouse pointer) feature in Windows 8.1, Windows 8 and Windows 7.

The long and short of it is that one has to run regedit.exe and then go to HKEY Current User -> Control Panel -> Desktop -> UserPreferencesMask and then use Windows’ calculator in programmer/hex mode (choose View -> Programmer in the menu, then select Hex on the left) to subtract 40 from the value of the first byte of the string of the registry value.

focus follows mouse 1

For example the first byte of the UserPreferencesMask key on my system was D9 (ignore the first four zeros in the key edit window) and subtracting 40 from it made it 99. To actually change the value of the first byte in the key edit window you have to double click on it.

focus follows mouse 3

The post above has a good explanation of it all and you can see my screenshots here of the changed value.

focus follows mouse 2

Once that is done and the value is changed in the UserPreferencesMask registry key it may also be desirable to edit the value of the ActiveWndTrkTimeout key which is in the same Desktop registry branch as the above key and change the value to something like 100 (decimal) which will decrease the focus delay a bit.

After these changes are made it is necessary to log out and back in again for them to take effect. Once you’ve logged back in you can test the changes by opening a couple windows so that one is slightly overlapping the other and try hovering the mouse cursor over each one. You should see the focus automatically shift to whichever window is being hovered over however the lower window should not be automatically raised when it is hovered over and receives focus.


Comments

2 responses to “Configure “focus follows mouse” behavior for Windows 8.1”

  1. To-mos Avatar
    To-mos

    I’m one of the few still using windows 8.1 because of all the undesirable updates and features of 10 it’s nice to have access to information like this, I’m building little reg files to make windows nice to use.

  2. winhelp Avatar
    winhelp

    Thanks a lot for this article!

Leave a Reply