Added support for arrow keys in keyboard input mode, using the GNU readline library