Syntax
int SetUseKeyClick2(
int mode
);
Parameters
- mode
-
[in] Sets the volume of the key click sound.
Value Description KC_HIGH Set the key click volume to high. KC_MEDIUM Set the key click volume to medium. KC_STANDARD Set the key click volume to standard.(Default) KC_LOW Set the key click volume to low. OFF Disabled the key click sounds. CURRENT_MODE Returns the current key click sound state.
Return value
Returns the state of the key click sound after the change.
Remarks
Sets the key click sound state (Volume high,medium,standard,low,off).
Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Sample
#include <stdio.h>
#include "lib.h"
void main(void)
{
char ch;
int ret = -1;
GotoXY( 1,1 );
printf("0:OFF 1:L 2:S 3:M 4:H\n");
while(1)
{
if (kbhit())
{
ch = getchar();
switch(ch)
{
case NUM0_KEY:
ret = SetUseKeyClick(OFF);
break;
case NUM1_KEY:
ret = SetUseKeyClick(KC_LOW);
break;
case NUM2_KEY:
ret = SetUseKeyClick(KC_STANDARD);
break;
case NUM3_KEY:
ret = SetUseKeyClick(KC_MEDIUM);
break;
case NUM4_KEY:
ret = SetUseKeyClick(KC_HIGH);
break;
default:
ret = SetUseKeyClick(CURRENT_MODE);
break;
}
GotoXY(1,2);
printf("ret = %d", ret);
ResetKey();
}
Idle();
}
}
Last updated: 2022/04/08