If you're using Windows messages for your keyboard input in a game, you'll either have to deal with whatever repeat rate the user has set for his machine or you'll have to set it for yourself. Luckily, setting it is extremely easy, so I'll just give you the code and let you learn from that. Be sure to restore the user's values before you exit your program!
int nKBDelay;
DWORD nKBSpeed;
if ( SystemParametersInfo( SPI_GETKEYBOARDDELAY, 0,
&nKBDelay, 0 ) == FALSE )
return FALSE;
if ( SystemParametersInfo( SPI_GETKEYBOARDSPEED, 0,
&nKBSpeed, 0 ) == FALSE )
return FALSE;
if ( SystemParametersInfo( SPI_SETKEYBOARDDELAY, 0, NULL,
SPIF_UPDATEINIFILE ) == FALSE )
return FALSE;
if ( SystemParametersInfo( SPI_SETKEYBOARDSPEED, 31, NULL,
SPIF_UPDATEINIFILE ) == FALSE )
return FALSE;
if ( SystemParametersInfo( SPI_SETKEYBOARDDELAY, nKBDelay, NULL,
SPIF_UPDATEINIFILE ) == FALSE )
return FALSE;
if ( SystemParametersInfo( SPI_SETKEYBOARDSPEED, nKBSpeed, NULL,
SPIF_UPDATEINIFILE ) == FALSE )
return FALSE;