Sunday, August 7, 2011

windws focus follows mouse registry hacks

inportant information i keep losing.

http://sinewalker.wordpress.com/2010/03/10/ms-windows-focus-follows-mouse-registry-hacks/

1. Run regedit (Win+R, regedit, OK)
2. Open up the key HKEY_CURRENT_USER\Control Panel\Mouse
3. Change the value of the REG_DWORD ActiveWindowTracking to 0×0000001 (1)

4. Open up the key HKEY_CURRENT_USER\Control Panel\Desktop
5. Add 1 to the MSB (most significant byte) of the REG_BINARY UserPreferencesMask. That is, if the current value is 00 3e 03 80 12 00 00 00, then change it to 01 3e 03 80 12 00 00 00. If you used the GUI as above, the MSB will be 41 (which brings the focused window to the front as well), so change it back to 01.


6. To make the focus a little slower, so that pop-up windows are useable, you also want to change the focus timing. Change the REG_DWORD ActiveWindTrkTimeout (also in HKEY_CURRENT_USER\Control Panel\Desktop) to the number of milliseconds to wait before focus shifts to the window under the mouse. I like a value of 0×00000080 (128ms). You might like 200ms (c8), or some faster or slower value.

So, in summary, the Registry keys are as follows for X11-like window focus:

HKEY_CURRENT_USERS\Control Panel\Mouse
REG_DWORD ActiveWindowTracking = 0x00000001 (1)

HKEY_CURRENT_USERS\Control Panel\Desktop
REG_DWORD ActiveWindTrkTimeout = 0x00000080 (128)
REG_BINARY UserPreferencesMask = 01 .. .. .. .. .. .. .. ..

No comments: