summaryrefslogtreecommitdiff
path: root/samples/pdfium_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'samples/pdfium_test.cc')
-rw-r--r--samples/pdfium_test.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index fa57d65b9e..e33ceadabf 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -607,7 +607,14 @@ void SendPageEvents(const FPDF_FORMHANDLE& form,
if (command[0].empty())
continue;
auto tokens = StringSplit(command[0], ',');
- if (tokens[0] == "keycode") {
+ if (tokens[0] == "charcode") {
+ if (tokens.size() == 2) {
+ int keycode = atoi(tokens[1].c_str());
+ FORM_OnChar(form, page, keycode, 0);
+ } else {
+ fprintf(stderr, "charcode: bad args\n");
+ }
+ } else if (tokens[0] == "keycode") {
if (tokens.size() == 2) {
int keycode = atoi(tokens[1].c_str());
FORM_OnKeyDown(form, page, keycode, 0);