Separate keyboard handling to generic function
Separate keyboard handling to generic function

This should be useful later if we wanted to allow for custom "binding"
sets to be stored in a cookie. (I think that'd be pretty neat and easy
to do)

liam-middlebrook/gallery,liam-middlebrook/gallery,liam-middlebrook/gallery,liam-middlebrook/gallery