Menu: support keyboard navigation (left, right, up, down, ...)

This adds support for keyboard navigation through the menu, using
left, right, up, down, page up/down, home, and end keys.

Thanks to Mohammad Etemaddar for suggesting this.