support input with arrow keys and hjkl