added j and k as movement buttons
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user