-
7.2.5 Control trigger key’s key event.
(FOR PA96x/PA982 Only)
Function Description:
This function is used to inform system if necessary to generate key event for trigger key.
Function call:
void EnableTriggerKeyEvent(BOOL fON)
Parameter(Input)
fON:
BOOL:
TRUE = Enable key event.
False = Don’t generate key event.
Note:
Trigger key activity will generate an event named TEXT("KeybdTriggerChangeEvent"). Fast,
repeated event generation may cause some trouble for AP By passing FALSE to this
function can prevent upcoming event generation.
7.2.6 Check Trigger key is pressing
Function Description:
This function is used to check if left or right trigger key is pressed or not.
Function call:
BOOL TriggerKeyStatus( int key);
Parameter(Input)
key:
int:
LEFT_TRIGGER_KEY
:
left
trigger
key
RIGHT_TRIGGER_KEY :
right
trigger
key.
Return code:
TRUE = trigger is pressed.
FALSE = trigger is released.
Example:
#define kKeybdTriggerEventName
TEXT("KeybdTriggerChangeEvent")
#define kKeybdAlphaKeyEventName
TEXT("KBDAlphaKeyChangeEvent")
#define LEFT_TRIGGER_KEY 1
#define RIGHT_TRIGGER_KEY 2
gKeyEvents[0] = CreateEvent(NULL, TRUE, FALSE, kKeybdTriggerEventName);
gKeyEvents[1] = CreateEvent(NULL, TRUE, FALSE, kKeybdAlphaKeyEventName);
while (1)
{
WaitForMultipleObjects(2, gKeyEvents, FALSE, INFINITE);
TriggerKeyStatus(LEFT_TRIGGER_KEY);
TriggerKeyStatus(RIGHT_TRIGGER_KEY);
}