I am using terminal server package
termnetd 3.2
, which reads serial port and gives output on telnet port. I logged into terminal server port, every thing works fine except the arrow keys, Home and End keys.Arrow Keys do not function on the terminal. For example if I press the up arrow key I cannot get the previous command I entered. Also in an application like vim I cannot use the arrow keys to move around the editor. In addition as I scro.
I updated bash to
bash 4.2
, with latest readline
package. Still the issue remains same. Is handling arrow keys related to readline library or termios' settings ??user53151user53151
2 Answers
The usual reason for bash disagreeing with cursor- and editing-keypad keys is that many terminal descriptions (such as vt100 and xterm) switch the terminal into application mode when initialized (using the
smkx
terminfo / ks
termcap escape sequence). bash doesn't do that (nor does the linux
terminal description, not coincidentally), and unless your .inputrc
is sprinkled with extra bindings to account for the unexpected key sequences sent in application mode, you'll have problems with bash.The readline library as such doesn't know the difference between normal/application mode. Likewise, termios is unrelated to the problem.
It's an FAQ of course:
- My cursor keys do not work (ncurses FAQ)
- Why can't I use the cursor keys in (whatever) shell? (xterm FAQ)
![Hyperterminal Arrow Keys Not Working Hyperterminal Arrow Keys Not Working](/uploads/1/2/3/7/123776442/618548218.jpg)
54.6k5 gold badges109 silver badges184 bronze badges
![Arrows keys not working excel Arrows keys not working excel](/uploads/1/2/3/7/123776442/355145739.png)
7,2665 gold badges29 silver badges46 bronze badges
AndreyAndrey