Implement KEY_UP and KEY_DOWN for line edits