support for portrait mode and numpad keyboard