4

The context

This is using Windows 10, Version 10.0.16299 Build 16299

The question

What I need is the window to remain in the background (perhaps covered up with other windows), but when I move the mouse cursor over it, I want to be able to type keypresses into that window, without raising the window.

The use-case is this: I have a TigerVNC window with lots of subwindows embedded within it, and I want it to stay put in the z-order: I don't want MS Windows to automatically raise to the top of the z-order unless/until I actually click inside that window with the left mouse button.

How do I do that? I heard from a friend that there is some Windows Registry setting I can change, using regedit, but he cannot recall what it was. We think it has something to do with one of the registry keys inside here:

registry settings screenshot

What I'm NOT asking about

Not quite the same thing as How can I make a window active without having to click in it in Windows 10? or any of the items referenced in one of its comments.

What I want is similar to, but not the same thing as, indicated here:

How to Turn On or Off Activate Window by Hovering Over with Mouse in Windows

combined with:

How to Change Time to Activate Window by Hovering Over with Mouse in Windows

It is not the same as those, because enabling "Activate a window by hovering over it with the mouse" will allow the window to be "activated" and thus will raise it above all other windows, thus obscuring windows I want to leave as they are currently in the z-order.

Possible duplicates

Windows 10 - Click a window without pulling it in front

1 Answer 1

0

You USED TO BE ABLE TO DO it this way, but this regedit value is now gone. It was there in March of 2020 I know for sure because I did then.

Step #1: Open regedit, go to HKEY_CURRENT_USER\Control Panel\Desktop Edit UserPreferenceMask value to be 9F 3E 07 80 12 00 00 00 [MY NOTE: Orig value was only different in first pair, but not as they state below, or maybe they've translated to decimal: 9E, or actually 9e (lower case) is what it was originally.] [You should only have to modify the first pair] NOTE: Default value is 98 12 07 80 12 00 00 00.

Step #2: Also in HKEY_CURRENT_USER\Control Panel\Desktop Edit ActiveWndTrkTimeout, change 'Base' to Decimal and put in 150 as the 'Value Data' NOTE: Default value is 500.

[This value is time in milliseconds that it takes for the focus to change. To avoid some issues with the taskbar I recommended using a value like 150 or so, but if you'd like to have a different delay before the window loses focus, set it to whatever you like.]

Step #3: Log off and log back in

! Information (Added by John Galt) Here is the registry key to do that if you don't want to edit the registry yourself. Hover window select.reg

Here is the registry key to restore the default values. Default Windows hover.reg

This results in windows being active (but not being raised) when you hover over them. [MY NOTE: It seems they are saying this for both options #2 and #3.]

OK, I just figured out where the UserPreferenceMask parameter is and successfully set it as specified above. It is exactly where it says it is, but I missed it the first time I tried earlier today. It is here:

Open Registry Editor: windows search for regedit, and run that

Registry Editor -> Computer -> HKEY_CURRENT_USER -> Control Panel -> Desktop

Then from there scroll down in the right hand pane of the window, which has the parameters sorted alphabetically. Scrolling down you'll find the UserPreferenceMask parameter. Either double-click it to edit it, or click once (left MB) and choose "Edit" at the top. Set it to this value (specified above as well): 9F 3E 07 80 12 00 00 00

And don't forget the rest of the steps above, which are:

Step #2: Also in HKEY_CURRENT_USER\Control Panel\Desktop Edit ActiveWndTrkTimeout, change 'Base' to Decimal and put in 150 as the 'Value Data' NOTE: Default value is 500.

[This value is time in milliseconds that it takes for the focus to change. To avoid some issues with the taskbar I recommended using a value like 150 or so, but if you'd like to have a different delay before the window loses focus, set it to whatever you like.]

Step #3: Log off and log back in

1
  • OK, I just figured out where the UserPreferenceMask parameter is and successfully set it as specified above. Commented Aug 11, 2021 at 18:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .