28#define ID_BLINK_TIMER 345
50 L"Control Panel\\Desktop",
57 wsprintf(szBuffer,
L"%d", uCaretBlinkTime);
87 &pSpeedData->nKeyboardDelay,
90 pSpeedData->nKeyboardDelay = 2;
93 pSpeedData->nOrigKeyboardDelay = pSpeedData->nKeyboardDelay;
98 &pSpeedData->dwKeyboardSpeed,
101 pSpeedData->dwKeyboardSpeed = 31;
104 pSpeedData->dwOrigKeyboardSpeed = pSpeedData->dwKeyboardSpeed;
106 pSpeedData->fShowCursor =
TRUE;
113 pSpeedData->uCaretBlinkTime = pSpeedData->uOrigCaretBlinkTime;
125 pSpeedData->uCaretBlinkTime = pSpeedData->uCaretBlinkTime >= 1200 ? -1 : pSpeedData->uCaretBlinkTime;
126 if ((
INT)pSpeedData->uCaretBlinkTime > 0)
151 pSpeedData->nKeyboardDelay,
160 pSpeedData->nKeyboardDelay,
180 pSpeedData->dwKeyboardSpeed,
189 pSpeedData->dwKeyboardSpeed,
209 pSpeedData->uCaretBlinkTime = pSpeedData->uCaretBlinkTime >= 1200 ? -1 : pSpeedData->uCaretBlinkTime;
210 if ((
INT)pSpeedData->uCaretBlinkTime > 0)
214 else if (pSpeedData->fShowCursor)
225 pSpeedData->uCaretBlinkTime = pSpeedData->uCaretBlinkTime >= 1200 ? -1 : pSpeedData->uCaretBlinkTime;
226 if ((
INT)pSpeedData->uCaretBlinkTime > 0)
230 else if (pSpeedData->fShowCursor)
244 if (pSpeedData->fShowCursor)
256 pSpeedData->fShowCursor = !pSpeedData->fShowCursor;
268 if (pSpeedData->uOrigCaretBlinkTime != pSpeedData->uCaretBlinkTime)
274 pSpeedData->nKeyboardDelay,
278 pSpeedData->dwKeyboardSpeed,
287 pSpeedData->nOrigKeyboardDelay,
291 pSpeedData->dwOrigKeyboardSpeed,
320 Guids[0] = GUID_DEVCLASS_KEYBOARD;
331 sizeof(Guids) /
sizeof(Guids[0]),
376 psh.hwndParent =
hwnd;
395 if (nPage != 0 && nPage <= psh.nPages)
396 psh.nStartPage = nPage;
static BOOL CALLBACK PropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
static VOID InitPropSheetPage(PROPSHEETPAGE *psp, PSERVICEPROPSHEET dlgInfo, WORD idDlg, DLGPROC DlgProc)
#define RegCloseKey(hKey)
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
static INT_PTR CALLBACK KeybHardwareProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
struct _SPEED_DATA * PSPEED_DATA
LONG APIENTRY KeyboardApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
struct _SPEED_DATA SPEED_DATA
static INT_PTR CALLBACK KeyboardSpeedProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
static VOID UpdateCaretBlinkTimeReg(_In_ UINT uCaretBlinkTime)
HWND WINAPI DeviceCreateHardwarePageEx(HWND hWndParent, LPGUID lpGuids, UINT uNumberOfGuids, HWPAGE_DISPLAYMODE DisplayMode)
#define IDC_SLIDER_CURSOR_BLINK
#define IDC_SLIDER_REPEAT_RATE
#define IDC_SLIDER_REPEAT_DELAY
#define IDC_TEXT_CURSOR_BLINK
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
#define HeapFree(x, y, z)
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
struct _PSP * HPROPSHEETPAGE
#define UNREFERENCED_PARAMETER(P)
#define PropSheet_Changed(d, w)
#define REGSTR_PATH_CONTROLSFOLDER
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
UINT WINAPI SHAddFromPropSheetExtArray(HPSXA hpsxa, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
HPSXA WINAPI SHCreatePropSheetExtArray(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface)
DWORD dwOrigKeyboardSpeed
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
BOOL WINAPI SetCaretBlinkTime(_In_ UINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define SPI_SETKEYBOARDSPEED
#define SPIF_UPDATEINIFILE
#define SPI_GETKEYBOARDSPEED
struct tagNMHDR * LPNMHDR
HDC WINAPI GetDC(_In_opt_ HWND)
HWND WINAPI GetParent(_In_ HWND)
#define SPI_GETKEYBOARDDELAY
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SystemParametersInfo
#define SendDlgItemMessage
#define SPI_SETKEYBOARDDELAY
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
UINT WINAPI GetCaretBlinkTime(void)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)