Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Both HOME and INSERT key send same escape sequence on ssh Post 302129054 by grossgermany on Friday 27th of July 2007 07:12:39 PM
Old 07-27-2007
Both HOME and INSERT key send same escape sequence on ssh

I couldn't seem to make 'HOME' key work on my remote windows ssh client to a Fedora Core3 server (the home key works perfectly when i'm physically on site.)
To my surprise, using control+V it seems that both my home and insert key send the same escape sequence ^[[2~, so when I press home in VI it actually toggles replace mode. How could this be possible? I've edited /etc/inputrc and every key works perfectly on site. So it must be my windows SSH client (the free one from www.ssh.com) that has problems.

my $TERM=xterm
controlVBackspace gives ^H (works)
controlVDel gives ^? (function as backspace in remote sshSmilie )
controlVHOME gives ^[[2~ (functions as insertin remote ssh Smilie )
controlVEND gives ^[[4~ (works fine!!! remotely )

stty -a yeilds:

speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

my /etc/inputrc:

"\eOH": beginning-of-line
"\eOF": end-of-line
"\e[H": beginning-of-line
"\e[F": end-of-line
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[7~": beginning-of-line
"\e[8~": end-of-line
"\e[3~": delete-char

"\C-?": delete-char
"\C-h": backward-delete-char

$if term=gnome
DEL: delete-char
Meta-DEL: kill-word
"\M-\C-?": kill-word
$endif

Last edited by grossgermany; 07-27-2007 at 08:19 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Escape sequence

Hi, I have got an application through which an user will submit an address like "c:\tuser\abc". This application calls a script and passes the address to the scripts positional parameter say $1. So $1 should contain "c:\tuser\abc", but when $1 is echoed the "\t" and "\a" are interpreted to... (4 Replies)
Discussion started by: puspendu
4 Replies

2. UNIX for Advanced & Expert Users

want to view the escape sequence

Hi, Is it possible to view the escape sequence in the ascii file. That is I want to see the newlinw character,tab ........ etc Thanks Sweta (4 Replies)
Discussion started by: sweta
4 Replies

3. Shell Programming and Scripting

escape sequence for $

Hi all, I have a requirement where the variable name starts with $, like $Amd=/home/student/test/ How to work wit it? can some one help me, am in gr8 confusion:confused: (5 Replies)
Discussion started by: shreekrishnagd
5 Replies

4. Shell Programming and Scripting

Removing Escape Sequence Characters

Hi All, I have added the script command to user profile so that to record the on-screen data.But when i i checked the O/P i could see lot of escape sequence is there way to remove it. (2 Replies)
Discussion started by: cutechaps
2 Replies

5. Shell Programming and Scripting

Help with escape sequence for '$' symbol in EGREP function

$table is the variable which contains name of the file. Filename may have the special character $. Need to escape $ . Tried below options to escape dollar: \$$table "\$"$table"" what is the escape sequence for egrep function..? Below is the code snippet- my $table; foreach... (3 Replies)
Discussion started by: xylus77
3 Replies

6. Red Hat

Grep doesn't understand escape sequence?

I ran the following grep and sed command. grep "\t" emp.txt sed -n '/\t/p' emp.txt grep treated the '\' as to escape t and took the pattern as literal t whereas sed took the pattern as tab. That means , grep doesn't understand escape sequence!!!!!! what to do to make grep... (8 Replies)
Discussion started by: ravisingh
8 Replies

7. Shell Programming and Scripting

Ignore escape sequence in sed

Friends, In the file i am having more then 100 lines like, File1 had the values like this: #Example East.server_01=EAST.SERVER_01 East.server_01=EAST.SERVER_01 West.server_01=WEST.SERVER_01 File2 had the values like this: #Example EAST.SERVER_01=http://yahoo.com... (3 Replies)
Discussion started by: jothi basu
3 Replies

8. Shell Programming and Scripting

Escape Sequence Overide in XML file

Hi I am try to use sed to remove decleration information from an XML file however their are special characters in the string and sed is not able to parse it . I am using the following commond. sed -e "s/xmlns=http://www.abc.com/integration/services/testtemplate1//g" Orginal.xml... (3 Replies)
Discussion started by: jimmyb
3 Replies

9. UNIX for Dummies Questions & Answers

Escape sequence for Function keys - terminfo

Having a doubt on how Function keys are mapped. 1. In my HPUX box my infocmp shows that kf1 (F1 key mapping) is not mapped. But somehow I am able to use an Informix form which requires navigation using F1 keys. vt100-w|vt100-w-am|dec vt100 132 cols (w/advanced video), bce, bw, ccc,... (3 Replies)
Discussion started by: clemansy
3 Replies

10. UNIX for Dummies Questions & Answers

Retrieve/download SSH key instead of Send/Upload?

Hi, is it possible to download/retrieve a public SSH key when you are logged in to the remote machine rather than sending the key, for example with ssh-copy-id from your local machine to the remote machine? I can only ssh into one direction (from the remote machine into the local machine),... (5 Replies)
Discussion started by: gczychi
5 Replies
stty(1B)																  stty(1B)

NAME
stty - set the options for a terminal SYNOPSIS
/usr/ucb/stty [-a] [-g] [-h] [modes] stty sets certain terminal I/O options for the device that is the current standard output. Without arguments, stty reports the settings of certain options. In this report, if a character is preceded by a caret (^), then the value of that option is the corresponding CTRL character (for example, ^h is <CTRL-h>. In this case, recall that <CTRL-h> is the same as the <BACKSPACE> key.) The sequence ^@ means that an option has a null value. -a Reports all of the option settings. -g Reports current settings in a form that can be used as an argument to another stty command. -h Reports all the option settings with the control characters in an easy to read column format. Options in the last group are implemented using options in the previous groups. Many combinations of options make no sense, but no sanity checking is performed. Hardware flow control and clock modes options might not be supported by all hardware interfaces. The options are selected from the following: Special Requests all Reports the same option settings as stty without arguments, but with the control characters in column format. everything Everything stty knows about is printed. Same as -h option. speed The terminal speed alone is reported on the standard output. size The terminal (window) sizes are printed on the standard output, first rows and then columns. This option is only appropri- ate if currently running a window system. size and speed always report on the settings of /dev/tty, and always report the settings to the standard output. Control Modes parenb (-parenb) Enable (disable) parity generation and detection. parext (-parext) Enable (disable) extended parity generation and detection for mark and space parity. parodd (-parodd) Select odd (even) parity, or mark (space) parity if parext is enabled. cs5 cs6 cs7 cs8 Select character size (see termio(7I)). 0 Hang up line immediately. 110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb Set terminal baud rate to the number given, if possible. (All speeds are not supported by all hardware interfaces.) ispeed 0 110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb Set terminal input baud rate to the number given, if possible. (Not all hardware supports split baud rates.) If the input baud rate is set to zero, the input baud rate is specified by the value of the output baud rate. ospeed 0 110 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb Set terminal output baud rate to the number given, if possible. (Not all hardware supports split baud rates.) If the baud rate is set to zero, the line is hung up immediately. hupcl (-hupcl) Hang up (do not hang up) connection on last close. hup (-hup) Same as hupcl (-hupcl). cstopb (-cstopb) Use two (one) stop bits per character. cread (-cread) Enable (disable) the receiver. clocal (-clocal) Assume a line without (with) modem control. crtscts (-crtscts) Enable hardware flow control. Raise the RTS (Request to Send) modem control line. Suspends output until the CTS (Clear to Send) line is raised. loblk (-loblk) Block (do not block) output from a non-current layer. Input Modes ignbrk (-ignbrk) Ignore (do not ignore) break on input. brkint (-brkint) Signal (do not signal) INTR on break. ignpar (-ignpar) Ignore (do not ignore) parity errors. parmrk (-parmrk) Mark (do not mark) parity errors (see termio(7I)). inpck (-inpck) Enable (disable) input parity checking. istrip (-istrip) Strip (do not strip) input characters to seven bits. inlcr (-inlcr) Map (do not map) NL to CR on input. igncr (-igncr) Ignore (do not ignore) CR on input. icrnl (-icrnl) Map (do not map) CR to NL on input. iuclc (-iuclc) Map (do not map) upper-case alphabetics to lower case on input. ixon (-ixon) Enable (disable) START/STOP output control. Output is stopped by sending an STOP and started by sending an START. ixany (-ixany) Allow any character (only START) to restart output. decctlq (-decctlq) Same as -ixany. ixoff (-ixoff) Request that the system send (not send) START/STOP characters when the input queue is nearly empty/full. tandem (-tandem) Same as ixoff. imaxbel (-imaxbel) Echo (do not echo) BEL when the input line is too long. iexten (-iexten) Enable (disable) extended (implementation-defined) functions for input data. Output Modes opost (-opost) Post-process output (do not post-process output; ignore all other output modes). olcuc (-olcuc) Map (do not map) lower-case alphabetics to upper case on output. onlcr (-onlcr) Map (do not map) NL to CR-NL on output. ocrnl (-ocrnl) Map (do not map) CR to NL on output. onocr (-onocr) Do not (do) output CRs at column zero. onlret (-onlret) On the terminal NL performs (does not perform) the CR function. ofill (-ofill) Use fill characters (use timing) for delays. ofdel (-ofdel) Fill characters are DELs (NULs). cr0 cr1 cr2 cr3 Select style of delay for carriage returns (see termio(7I)). nl0 nl1 Select style of delay for line-feeds (see termio(7I)). tab0 tab1 tab2 tab3 Select style of delay for horizontal tabs (see termio(7I)). bs0 bs1 Select style of delay for backspaces (see termio(7I)). ff0 ff1 Select style of delay for form-feeds (see termio(7I)). vt0 vt1 Select style of delay for vertical tabs (see termio(7I)). Local Modes isig (-isig) Enable (disable) the checking of characters against the special control characters INTR, QUIT, and SWTCH. For information on SWTCH, see NOTES. icanon (-icanon) Enable (disable) canonical input (ERASE and KILL processing). Does not set MIN or TIME. cbreak (-cbreak) Equivalent to -icanon min 1 time 0. xcase (-xcase) Canonical (unprocessed) upper/lower-case presentation. echo (-echo) Echo back (do not echo back) every character typed. echoe (-echoe) Echo (do not echo) ERASE character as a backspace-space-backspace string. Note: This mode erases the ERASEed character on many CRT terminals; however, it does not keep track of column position and, as a result, can be con- fusing on escaped characters, tabs, and backspaces. crterase (-crterase) Same as echoe. echok (-echok) Echo (do not echo) NL after KILL character. lfkc (-lfkc) The same as echok (-echok); obsolete. echonl (-echonl) Echo (do not echo) NL. noflsh (-noflsh) Disable (enable) flush after INTR, QUIT, or SWTCH. For information on SWTCH, see NOTES. stwrap (-stwrap) Disable (enable) truncation of lines longer than 79 characters on a synchronous line. (Does not apply to the 3B2.) tostop (-tostop) Send (do not send) SIGTTOU for background processes. echoctl (-echoctl) Echo (do not echo) control characters as ^char, delete as ^? ctlecho (-ctlecho) Same as echoctl. echoprt (-echoprt) Echo (do not echo) erase character as character is ``erased''. prterase (-prterase) Same as echoprt. echoke (-echoke) BS-SP-BS erase (do not BS-SP-BS erase) entire line on line kill. crtkill (-crtkill) Same as echoke. flusho (-flusho) Output is (is not) being flushed. pendin (-pendin) Retype (do not retype) pending input at next read or input character. stflush (-stflush) Enable (disable) flush on a synchronous line after every write(2). (Does not apply to the 3B2.) stappl (-stappl) Use application mode (use line mode) on a synchronous line. (Does not apply to the 3B2.) Hardware Flow Control Modes rtsxoff (-rtsxoff) Enable (disable) RTS hardware flow control on input. ctsxon (-ctsxon) Enable (disable) CTS hardware flow control on output. dterxoff (-dterxoff) Enable (disable) DTER hardware flow control on input. rlsdxon (-rlsdxon) Enable (disable) RLSD hardware flow control on output. isxoff (-isxoff) Enable (disable) isochronous hardware flow control on input. Clock Modes xcibrg Get transmit clock from internal baud rate generator. xctset Get the transmit clock from transmitter signal element timing (DCE source) lead, CCITT V.24 circuit 114, EIA-232-D pin 15. xcrset Get transmit clock from receiver signal element timing (DCE source) lead, CCITT V.24 circuit 115, EIA-232-D pin 17. rcibrg Get receive clock from internal baud rate generator. rctset Get receive clock from transmitter signal element timing (DCE source) lead, CCITT V.24 circuit 114, EIA-232-D pin 15. rcrset Get receive clock from receiver signal element timing (DCE source) lead, CCITT V.24 circuit 115, EIA-232-D pin 17. tsetcoff Transmitter signal element timing clock not provided. tsetcrc Output receive clock on transmitter signal element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24, clock source. tsetcxc Output transmit clock on transmitter signal element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24, clock source. rsetcoff Receiver signal element timing clock not provided. rsetcrc Output receive clock on receiver signal element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin, clock source. rsetcxc Output transmit clock on receiver signal element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin, clock source. Control Assignments control-character c Set control-character to c, where control-character is intr, quit, erase, kill, eof, eol, eol2, swtch, start, stop, susp, dsusp, rprnt, flush, werase, lnext min, ctab, time, or brk) (ctab is used with -stappl; min and time are used with -icanon; see termio(7I)). If c is preceded by an (escaped from the shell) caret (^), then the value used is the corresponding CTRL character (for example, ``^d'' is a Control-d). ``^?'' is interpreted as DEL and ``^-'' is interpreted as undefined. For information on SWTCH, see NOTES. line i Set line discipline to i (0 < i < 127 ). Combination Modes evenp or parity Enable parenb and cs7. -evenp, or -parity Disable parenb, and set cs8. even (-even) Same as evenp (-evenp). oddp Enable parenb, cs7, and parodd. -oddp Disable parenb and parodd, and set cs8. odd (-odd) Same as oddp (-oddp). spacep Enable parenb, cs7, and parext. -spacep Disable parenb and parext, and set cs8. markp Enable parenb, cs7, parodd, and parext. -markp Disable parenb, parodd, and parext, and set cs8. raw (-raw or cooked) Enable (disable) raw input and output (no ERASE, KILL, INTR, QUIT, SWTCH, EOT, or output post processing). For information on SWTCH, see NOTES. nl (-nl) Unset (set) icrnl, onlcr. In addition -nl unsets inlcr, igncr, ocrnl, and onlret. lcase (-lcase) Set (unset) xcase, iuclc, and olcuc. LCASE (-LCASE) Same as lcase (-lcase). tabs (-tabs or tab3) Preserve (expand to spaces) tabs when printing. ek Reset ERASE and KILL characters back to normal DEL and <CTRL-u>, respectively. sane Reset all modes to some reasonable values. term Set all modes suitable for the terminal type term, where term is one of tty33, tty37, vt05, tn300, ti700, or tek. async Set normal asynchronous communications where clock settings are xcibrg, rcibrg, tsetcoff and rsetcoff. litout (-litout) Disable (enable) parenb, istrip, and opost, and set cs8 (cs7). pass8 (-pass8) Disable (enable) parenb and istrip, and set cs8 (cs7). crt Set options for a CRT (echoe, echoctl, and, if >= 1200 baud, echoke.) dec Set all modes suitable for Digital Equipment Corp. operating systems users ERASE, KILL, and INTR characters to ^?, ^U, and ^C, decctlq, and crt.) Window Size rowsn Set window size to n rows. columnsn Set window size to n columns. colsn An alias for columns n. ypixelsn Set vertical window size to n pixels. xpixelsn Set horizontal window size to n pixels. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ tabs(1), ioctl(2), attributes(5), termio(7I), termiox(7I) Solaris does not support any of the actions implied by swtch, which was used by the sxt driver on System V release 4. Solaris allows the swtch value to be set, and prints it out if set, but it does not perform the swtch action. The job switch functionality on Solaris is actually handled by job control. susp is the correct setting for this. 14 Feb 2005 stty(1B)
All times are GMT -4. The time now is 03:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy