LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2012, 11:00 AM   #1
errigour
Member
 
Registered: May 2009
Posts: 291

Rep: Reputation: 6
What are these characters ^[[D^[[A^[[C^[[B^[[5~^[[6~^[[H^[[F^[[3~^[[2~ ?


When I execute a program that doesn't directly specify what up down left
right page up page down home end insert delete do or when I use telnet
the output is:
^[[D^[[A^[[C^[[B^[[5~^[[6~^[[H^[[F^[[3~^[[2~

What the heck do they do? even when my program is waiting for input when I
type home or ^[[H it puts the string at the top of the buffer leaving the text
on it which is pretty cool to overwrite.Is it the kernel that does that or the
software developers who provide the kernel and if the kernel is there a reason
or is that just something that has been forgotten? tty3 doesn't recognize home
just konsole, that I know of so far. Hm yea my program doesn't recognize the
output when I proceed my input with one of those characters.

mmmmmmh scroll lock works.

Last edited by errigour; 10-01-2012 at 11:01 AM.
 
Old 10-01-2012, 11:17 AM   #2
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192
Blog Entries: 2

Rep: Reputation: 22
They are the escape codes. The Special keys on your keyboard do have their unique escape codes. They don't do much though... Just an example, if you press CTRL+A in the shell, it will beep.

Last edited by suttiwit; 10-01-2012 at 11:18 AM.
 
Old 10-01-2012, 11:24 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
Those are X terminal control sequences; from the manual page:
Quote:
telnet uses at least the HOME, SHELL, DISPLAY, and TERM environment variables. Other
environment variables may be propagated to the other side via the TELNET ENVIRON option.
Check your TERM environment with
Code:
echo ${TERM}
it may be linux or xterm (or something else entirely) and you'll need to set it when you get connected to whatever the remote system knows about (xterm is usually a good starting value). X terminal control sequences are DEC VT102/VT220 compatible and many remotes will recognize a TERM environment of one of those.

Read through the manual page and possibly use one or more of the command line options so telnet will "talk nice" with the remote.

Another option is to use ssh (if it's a Unix/Linux box on the other end) and you'll probably have a little better luck.

Hope this helps some.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Mastering Characters Sets in Linux (Weird Characters, part 2) LXer Syndicated Linux News 0 11-26-2009 12:30 AM
splitting numbers and characters from an array of characters. trscookie Programming 6 11-14-2008 10:34 AM
Accented Characters and other "foreign language" Characters Mark_in_Hollywood LQ Suggestions & Feedback 2 04-30-2007 07:10 PM
How to modify the names of files and replace characters with other characters or symb peter88 Linux - General 2 12-10-2006 04:05 AM
Special characters consty Programming 3 08-07-2005 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration