treat arrow keys and page up and down as vi keys
check on empty pattern
use switch