File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 4
4
* Sync scroll in markdown editor and preview
5
5
* Pin ghostscript version to fix bugs in pdf compression
6
6
* Prevent PDF rendering Vue warning about tr children of table tags
7
+ * PDF viewer: Allow navigation via arrow keys
7
8
* UI: Add a button to expand collapsed menus
8
9
* UI: Fix sections not sorted in sidebar
9
10
* UI: Add shortcut indicator to save comments
Original file line number Diff line number Diff line change @@ -240,6 +240,22 @@ class PDFViewerApplicationClass {
240
240
this . download ( ) ;
241
241
handled = true ;
242
242
}
243
+ } else if ( ! e . ctrlKey && ! e . metaKey && ! e . altKey && ! e . shiftKey ) {
244
+ if (
245
+ ( e . key === 'ArrowLeft' && ! this . pdfViewer . isHorizontalScrollbarEnabled ) ||
246
+ e . key === 'k' ||
247
+ e . key === 'p'
248
+ ) {
249
+ this . pdfViewer . previousPage ( ) ;
250
+ handled = true ;
251
+ } else if (
252
+ ( e . key === 'ArrowRight' && ! this . pdfViewer . isHorizontalScrollbarEnabled ) ||
253
+ e . key === 'j' ||
254
+ e . key === 'n'
255
+ ) {
256
+ this . pdfViewer . nextPage ( ) ;
257
+ handled = true ;
258
+ }
243
259
}
244
260
245
261
if ( handled ) {
You can’t perform that action at this time.
0 commit comments