Hi,

Im using Galleria with ImageField..

But I need the image switched using keyboard arrow key.. (next and previous using left and right arrow key)

Do you know how to make it?

Thanks in advance.

CommentFileSizeAuthor
#3 galleria.patch718 bytesrapsli

Comments

Mark Theunissen’s picture

Yes, you could use javascript and bind the key press to trigger the event. It's a programming task.

rapsli’s picture

I'm working on this.
Further I'm working on support for nodereference

rapsli’s picture

Status: Active » Needs review
StatusFileSize
new718 bytes

patch for using key navigation (arrow left and arrow right)

dman’s picture

A reasonable idea, but I can't see how to apply the patch. It says it is for a file called 'galleria.js' but no file of that name seems to be in the current release.?
If you'd made the patch with the -up options I may have been able to figure it out.
Also has some extra whitspace in odd places.

Try making the change on a checked-out version of the code, then you can go cvs diff -up and get a clean diff against the current branch.

apasaja’s picture

thanks for the reply..

Im trying and waiting

rapsli’s picture

-> right now pretty tight with my schedule, but the patch is trivial.
Just append the php stuff to the end of the document (remove + and @ stuff)

@@ -129,0 +127,13 @@
+	// listens for any navigation keypress activity
+	$(document).keypress(function(e)
+  {
+    switch(e.keyCode)
+    {
+      case 37: //press left arrow  
+            $.galleria.prev();
+            break;
+      case 39: //press right arrow
+            $.galleria.next();
+            break;  
+    }
+  });
apasaja’s picture

still not works for me... maybe I missing some codes..

Anyone got it works?