Enabling a Built-in Accessibility Feature

The following code fragment uses the SystemParametersInfo function to enable the FilterKeys feature:

FILTERKEYS fk;

BOOL bSuccess;

// fill in members of the FILTERKEYS structure

fk.cbSize = sizeof(FILTERKEYS);

fk.dwFlags = (FKF_FILTERKEYSON | FKF_HOTKEYACTIVE |

FKF_AVAILABLE | FKF_HOTKEYSOUND | FKF_CLICKON);

fk.iWaitMSec = 1000;

fk.iDelayMSec = 1000;

fk.iRepeatMSec = 500;

fk.iBounceMSec = 0;

// call SystemParametersInfo with SPI_SETFILTERKEYS code

bSuccess = SystemParametersInfo(SPI_SETFILTERKEYS, 0, (LPVOID) &fk, 0);