added basic keyboard support for gallery