discussion, gear, and photography journal
As a regular user of Google Reader (Google's web-based RSS reader), I've become used to the keyboard shortcuts it supports to speed up navigation.
(If you use Google Reader, and were not aware of the keyboard shortcuts, hit "shift-?" in Google Reader to view the complete list of valid shortcuts.)

I decided to implement something similar in my photo gallery, to allow keyboard shortcuts to be used to navigate through all photos in a gallery.

Some quick Googling turned up plenty of sample javascript code for implementing this functionality. I ended up using sample code from a page titled Handling Keyboard Shortcuts in JavaScript.

After a bit of coding, my photo gallery now supports the following keyboard shortcuts when viewing the contents of a gallery:

j    next image
k    previous image
shift-j    next page
shift-k    previous page

These use of the j and k shortcut keys is similar to that in Google Reader, and is very familiar to me, as j and k are used in vi (a linux text editor) for moving to the next and previous lines.
learn more about your camera and how to use it
making photo books? save with Blurb discount coupons
Blurb
[ MartyBugs home | blog | about this site | copyright | disclaimer | privacy | appreciation | contact details | site map ]
web by mpot.  all content and images are copyright © 2001-2025 .
all rights reserved.  unauthorised duplication, reproduction or distribution is prohibited.
martybugs.net