support UP/DOWN buttons in terminal