temporary change touchpad settings from application WIN10

16 views Asked by At

In my application I'm trying to temporary turn off TwoFingerTapEnabled & TapsEnabled for the touchpad. ProcMon confirms the regular windows GUI settings write the 2 registries within HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad

reading and writing the registries is no problem but to directly apply the new settings does not seem to get me anywhere.

so far I tried sending WM_SETTINGCHANGE messages, like

SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)TEXT("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\PrecisionTouchPad\\TapsEnabled"), 0, 1000, &res);
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)TEXT("TapsEnabled"), 0, 1000, &res);
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)TEXT("Environment"), 0, 1000, &res); //?
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, &res);

in these cases SendMessageTimeout always returns a non-zero value.

restarting the device(s) with PnpUtil

restarting the service hidserv

disabling and enabling in device manager.

but nothing seems to work

Trying to look in the Settings Management Infrastructure (SMI) as an alternative option to change settings, but cant figure out how, or see any examples using SMI.

while trying things out I had settings GUI and regedit closed. the Settings GUI can change the settings directly (with a small delay).

0

There are 0 answers