pdfSetKeyPressCbk
Set a callback function for key-press events.
void pdfSetKeyPressCbk(PDFViewerHandle viewer,
void (*cbk)(void *data, int ascii),
void *data)
This function sets a callback which will be called when a user
presses and releases a key corresponding to an ASCII character.
The function will be called with two arguments:
data
: the value of thedata
argument that was passed topdfSetKeyPressCbk
ascii
: the ASCII character
C:
void keyPressCbk(void *data, int ascii) {
Context *myContext = (Context *)data;
/* process the character ... */
}
....
pdfSetKeyPressCbk(viewer, &keyPressCbk, &myContext);