Integrate key bindings

I've added key bindings for closing the gallery and switching between the images when the gallery is open.