From f09fde59c70ace640e19c0bd6d4b2cafcbdca845 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 17 Mar 2016 09:30:04 +0000 Subject: [PATCH] added left-key and right-key handler to the code file view for a pdf document --- codepot/src/codepot/views/code_file.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codepot/src/codepot/views/code_file.php b/codepot/src/codepot/views/code_file.php index 34009e9b..411b0ee6 100644 --- a/codepot/src/codepot/views/code_file.php +++ b/codepot/src/codepot/views/code_file.php @@ -330,6 +330,16 @@ $(function () { queue_pdf_rendering_in_progress (pdf_page_num); }); + $(document).keydown (function(event) { + if (event.keyCode == 37) + { + on_prev_pdf_page(); + } + else if (event.keyCode == 39) + { + on_next_pdf_page(); + } + }); });