From 5889f346958dfefd83d633ced681127abd1c678f Mon Sep 17 00:00:00 2001 From: Luis Nieto Date: Thu, 8 Jul 2021 23:43:38 -0500 Subject: [PATCH] Add keys to change image source in sequence mode Add the keys 'j' and 'k' to change the image source in the viewer. - 'j': previous source - 'k': next source --- src/viewer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/viewer.js b/src/viewer.js index ffbe0f4f..03276a7b 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2782,6 +2782,12 @@ function onCanvasKeyPress( event ) { this.viewport.toggleFlip(); event.preventDefault = true; break; + case 106: //j - previous image source + onPrevious.bind(this)(); + break; + case 107: //k - next image source + onNext.bind(this)(); + break; default: // console.log( 'navigator keycode %s', event.keyCode ); event.preventDefault = false;