pdfSetKeyDownCbk
Set a callback function for key-down events.
void pdfSetKeyDownCbk(PDFViewerHandle viewer,
void (*cbk)(void *data, int code, int shift),
void *data)
This function sets a callback which will be called when a user presses
a key.
The function will be called with three arguments:
data
: the value of thedata
argument that was passed topdfSetKeyDownCbk
code
: the key codeshift
: the shift/control/alt bit mask, which contains zero or more bit flags frompdfShiftKey
,pdfCtrlKey
, andpdfAltKey
C:
void keyDownCbk(void *data, int code, int shift) {
Context *myContext = (Context *)data;
/* process the key press ... */
}
....
pdfSetKeyDownCbk(viewer, &keyDownCbk, &myContext);