Buddha

Buddha
Seek

Thursday, March 3, 2011

Arrow keys not working properly on terminal

Arrow keys did not seem to be doing what they were supposed to with a few applications. With cscope it wasn't going up and down the menu items. Instead when I pressed the keys, it was giving a whole lot of control characters. With yast2, the arrow keys wouldn't simply make the cursor move. The system was a Suse Linux Enterprise Edition box. I was trying to figure out what makes it move on Ubuntu(my other box) and not on SLES.

The fix was simple. Found out that its the way different terminals handle arrow keys.

If you try echo $TERM on your shell, it showed me something like, xtermc. I replaced the value like below:

export $TERM="vt100"

This simply worked. Now my arrow keystrokes are identified properly. More on text based terminals here.

No comments: