From a622ddcba3780c544e9f67f49400cfd42aac2d20 Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Sat, 3 Mar 2012 10:10:23 +0200 Subject: [PATCH] added j and k as movement buttons --- galleryscript.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/galleryscript.js b/galleryscript.js index 3ee1da1..db37f01 100644 --- a/galleryscript.js +++ b/galleryscript.js @@ -539,26 +539,26 @@ function keypressed(e) { currentimage=0; showimage(currentimage); } - // arrow left: move 1 left - if (unicode==37 && shift==0) { + // arrow left, j: move 1 left + if ((unicode==37 || unicode==74 ) && shift==0) { currentimage-=1; if (currentimage<0) { currentimage=imagelist.length-1; } showimage(currentimage); } - // shift arrow left: move 1 page left - if (unicode==37 && shift==1) { + // shift arrow left, j: move 1 page left + if ((unicode==37 || unicode==74 ) && shift==1) { currentimage-=maxThumb; if (currentimage<0) { currentimage=imagelist.length-1; } showimage(currentimage); } - // arrow right: move 1 right - if (unicode==39 && shift==0) { + // arrow right, k: move 1 right + if ((unicode==39 || unicode==75) && shift==0) { currentimage+=1; if (currentimage>(imagelist.length-1)) { currentimage=0; } showimage(currentimage); } - // shift arrow right: move 1 page right - if (unicode==39 && shift==1) { + // shift arrow right, k: move 1 page right + if ((unicode==39 || unicode==75) && shift==1) { currentimage+=maxThumb; if (currentimage>(imagelist.length-1)) { currentimage=0; } showimage(currentimage);