add a keypress handler for library grid