added j and k as movement buttons
This commit is contained in:
@@ -539,26 +539,26 @@ function keypressed(e) {
|
|||||||
currentimage=0;
|
currentimage=0;
|
||||||
showimage(currentimage);
|
showimage(currentimage);
|
||||||
}
|
}
|
||||||
// arrow left: move 1 left
|
// arrow left, j: move 1 left
|
||||||
if (unicode==37 && shift==0) {
|
if ((unicode==37 || unicode==74 ) && shift==0) {
|
||||||
currentimage-=1;
|
currentimage-=1;
|
||||||
if (currentimage<0) { currentimage=imagelist.length-1; }
|
if (currentimage<0) { currentimage=imagelist.length-1; }
|
||||||
showimage(currentimage);
|
showimage(currentimage);
|
||||||
}
|
}
|
||||||
// shift arrow left: move 1 page left
|
// shift arrow left, j: move 1 page left
|
||||||
if (unicode==37 && shift==1) {
|
if ((unicode==37 || unicode==74 ) && shift==1) {
|
||||||
currentimage-=maxThumb;
|
currentimage-=maxThumb;
|
||||||
if (currentimage<0) { currentimage=imagelist.length-1; }
|
if (currentimage<0) { currentimage=imagelist.length-1; }
|
||||||
showimage(currentimage);
|
showimage(currentimage);
|
||||||
}
|
}
|
||||||
// arrow right: move 1 right
|
// arrow right, k: move 1 right
|
||||||
if (unicode==39 && shift==0) {
|
if ((unicode==39 || unicode==75) && shift==0) {
|
||||||
currentimage+=1;
|
currentimage+=1;
|
||||||
if (currentimage>(imagelist.length-1)) { currentimage=0; }
|
if (currentimage>(imagelist.length-1)) { currentimage=0; }
|
||||||
showimage(currentimage);
|
showimage(currentimage);
|
||||||
}
|
}
|
||||||
// shift arrow right: move 1 page right
|
// shift arrow right, k: move 1 page right
|
||||||
if (unicode==39 && shift==1) {
|
if ((unicode==39 || unicode==75) && shift==1) {
|
||||||
currentimage+=maxThumb;
|
currentimage+=maxThumb;
|
||||||
if (currentimage>(imagelist.length-1)) { currentimage=0; }
|
if (currentimage>(imagelist.length-1)) { currentimage=0; }
|
||||||
showimage(currentimage);
|
showimage(currentimage);
|
||||||
|
|||||||
Reference in New Issue
Block a user