-
-
Save sir-pinecone/37e1b018de2d00080a835efd4f644444 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LIBRARY user32 | |
EXPORTS | |
UserGetPrecisionTouchPadConfiguration @2548 | |
UserSetPrecisionTouchPadConfiguration @2549 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lib /def:user32.def | |
// cl /O2 test.cpp /link user32.lib | |
#include <Windows.h> | |
#include <stdio.h> | |
struct PrecisionTouchPadConfig { | |
BYTE LegacyParams[3]; | |
BOOL LoadedSettings; | |
// 0: No delay (always on) | |
// 1: Short delay | |
// 2: Medium delay (default) | |
// 3: Long delay | |
// 4: Turn off taps | |
DWORD AAPThreshold; | |
// 0001: PTPEnabled | |
// 0004: EnableEdgy | |
// 0008: ScrollDirection | |
// 0080: LeaveOnWithMouse | |
// 0100: RightClickZoneEnabled | |
// 0200: TapAndDrag | |
// 0400: IsTPActive | |
// 0800: IsMouseConnected | |
DWORD Flags; | |
}; | |
extern "C" BOOL __stdcall UserGetPrecisionTouchPadConfiguration(PrecisionTouchPadConfig *config); | |
extern "C" BOOL __stdcall UserSetPrecisionTouchPadConfiguration(PrecisionTouchPadConfig *config); | |
int main() { | |
PrecisionTouchPadConfig config = {0}; | |
// Must be 0 or 1 for GetPrecisionTouchPadConfiguration to return data. | |
config.LoadedSettings = 1; | |
BOOL getSuccess = UserGetPrecisionTouchPadConfiguration(&config); | |
printf("getSuccess = %d\n LegacyParams=%02x%02x%02x\n LoadedSettings=%02x\n AAPThreshold=%d\n Flags=%08x\n", | |
getSuccess, | |
config.LegacyParams[0], config.LegacyParams[1], config.LegacyParams[2], | |
config.LoadedSettings, config.AAPThreshold, config.Flags); | |
if (getSuccess) { | |
config.AAPThreshold = 0; | |
BOOL setSuccess = UserSetPrecisionTouchPadConfiguration(&config); | |
printf("setSuccess = %d\n", setSuccess); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.reddit.com/r/Windows10/comments/3fegeo/windows_10_mouse_click_delay/