Sponsored Content
Top Forums UNIX for Dummies Questions & Answers SunOS 5.10 - VI Arrow keys not working Post 302181740 by ravashingravi on Thursday 3rd of April 2008 11:50:47 PM
Old 04-04-2008
Problem still exists

Hi

I tried both

set TERM=vt100
and export EDITOR

but nothing is working

Thanks and regards
Ravs
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trapping Arrow keys

Hey Guys , How do we trap the arrow keys in shell programming. Or atleast can we read the ascii code of the arrow keys. I want to read the arrow keys pressed by the user and accordingly highlight the corresponding menu option. Is it possible in shell to do so ?? ... (1 Reply)
Discussion started by: nageshrc
1 Replies

2. UNIX for Dummies Questions & Answers

arrow keys / special keys

how to use the arrow keys in shell scripting. is there any special synatax / command for this. i just want to use the arrow keys for navigation. replies appreciated raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies

3. Shell Programming and Scripting

How to read arrow keys on really old bash?

I would like to get a script to respond to arrow key presses to scroll up and down a menu. The platform is CDLinux which uses a prehistoric version of bash, version 1.14.7. I would like to do something like "read -sn 1 keyin" but the "read" command is so primative that it only has the -r... (1 Reply)
Discussion started by: simonb
1 Replies

4. Solaris

Using arrow keys

Hello, I am unable to use the arrow keys in some applications. For example, in bash, I am able to use the arrow keys to to go back and forth characters in current line and search the history--I can do everything you'd expect to be able to do with the arrow keys. However, in bc, I cannot use... (4 Replies)
Discussion started by: cooldude
4 Replies

5. UNIX and Linux Applications

command scrolling using arrow keys

hi, can anyone tell me how to enable arrow keys to scroll thru the commands on command prompt. I am using C shell ( I know, in k shell, set -o vi would enable vi command history, but set -o doesnte exist in c shell) (4 Replies)
Discussion started by: hemangi13
4 Replies

6. Shell Programming and Scripting

Using arrow keys in shell scripts

I recently needed to collect arrow keys (and function keys etc.) in a shell script so that I could run a text graphics-style data entry system (with text entry fields, drop-down list boxes, progress bars and the like). Yes you can do all this in shell, and portably too if you're careful. I've... (4 Replies)
Discussion started by: cambridge
4 Replies

7. Shell Programming and Scripting

problem using arrow keys in bash shell

hello everybody, as many, I have a problem with a script... I wrote a shell script in which I want to read a variable value. the problem is that I can't use the arrow keys. Here is the script I use : #!/bin/bash stty erase ^H read foune echo "$foune" exit 0; the problem is... (2 Replies)
Discussion started by: Moumou
2 Replies

8. UNIX for Advanced & Expert Users

SSH closes connection when using arrow keys

Hi, I'm having a problem with my ssh link to various Sun servers running Solaris 9 and 10 from an Windows XP box running Cygwin/X. I am using ssh to connect to a number of different Sun servers. My problem is that when editing a remote shell command line with the arrow direction keys the... (0 Replies)
Discussion started by: stv_t
0 Replies

9. UNIX for Dummies Questions & Answers

Tux-HJKL as arrow keys

I would like to configure the key combination Tux-J (Win-J) as Down Arrow, and the rest of the VIM-style movement keys as well (HKL). What is the best way to do this so that it will work in all applications? I thought about editing the keyboard layout but I'm not sure how to do that for Tux-key... (2 Replies)
Discussion started by: dotancohen
2 Replies

10. UNIX for Dummies Questions & Answers

Arrow keys binding in AIX v5.3 - how?

Would somebody advise how arrow keys could be binded in AIX v5.3? I could not find reasonable information online related to AIX. I've meat advises to define: alias __A=$'\020' # or the same: alias __A=$(echo "\020") alias __B=$'\016' alias __C=$'\006' alias __D=$'\002' But it does... (2 Replies)
Discussion started by: alex_5161
2 Replies
TSET(1) 						      General Commands Manual							   TSET(1)

NAME
tset - terminal dependent initialization SYNOPSIS
tset [ options ] [ -m [ident][test baudrate]:type ] ... [ type ] reset [ options ] [ -m [ident][test baudrate]:type ] ... [ type ] DESCRIPTION
Tset sets up your terminal when you first log in to a UNIX system. It does terminal dependent processing such as setting erase and kill characters, setting or resetting delays, sending any sequences needed to properly initialized the terminal, and the like. It first deter- mines the type of terminal involved, and then does necessary initializations and mode settings. The type of terminal attached to each UNIX port is specified in the /etc/ttys(5) database. Type names for terminals may be found in the termcap(5) database. If a port is not wired permanently to a specific terminal (not hardwired) it will be given an appropriate generic identifier such as dialup. In the case where no arguments are specified, tset simply reads the terminal type out of the environment variable TERM and re-initializes the terminal. The rest of this manual concerns itself with mode and environment initialization, typically done once at login, and options used at initialization time to determine the terminal type and set up terminal modes. When used in a startup script (.profile for sh(1) users or .login for csh(1) users) it is desirable to give information about the type of terminal you will usually use on ports which are not hardwired. These ports are identified in /etc/ttys as dialup or plugboard or arpanet, etc. To specify what terminal type you usually use on these ports, the -m (map) option flag is followed by the appropriate port type iden- tifier, an optional baud rate specification, and the terminal type. (The effect is to ``map'' from some conditions to a terminal type, that is, to tell tset ``If I'm on this kind of port, guess that I'm on that kind of terminal''.) If more than one mapping is specified, the first applicable mapping prevails. A missing port type identifier matches all identifiers. Any of the alternate generic names given in termcap may be used for the identifier. A baudrate is specified as with stty(1), and is compared with the speed of the diagnostic output (which should be the control terminal). The baud rate test may be any combination of: >, @, <, and !; @ means ``at'' and ! inverts the sense of the test. To avoid problems with metacharacters, it is best to place the entire argument to -m within ``''' characters; users of csh(1) must also put a ``'' before any ``!'' used here. Thus tset -m 'dialup>300:adm3a' -m dialup:dw2 -m 'plugboard:?adm3a' causes the terminal type to be set to an adm3a if the port in use is a dialup at a speed greater than 300 baud; to a dw2 if the port is (otherwise) a dialup (i.e. at 300 baud or less). (NOTE: the examples given here appear to take up more than one line, for text processing reasons. When you type in real tset commands, you must enter them entirely on one line.) If the type finally determined by tset begins with a question mark, the user is asked if s/he really wants that type. A null response means to use that type; otherwise, another type can be entered which will be used instead. Thus, in the above case, the user will be queried on a plugboard port as to whether they are actually using an adm3a. If no mapping applies and a final type option, not preceded by a -m, is given on the command line then that type is used; otherwise the type found in the /etc/ttys database will be taken to be the terminal type. This should always be the case for hardwired ports. It is usually desirable to return the terminal type, as finally determined by tset, and information about the terminal's capabilities to a shell's environment. This can be done using the - option; using the Bourne shell, sh(1): export TERM; TERM=`tset - options...` or using the C shell, csh(1): setenv TERM `tset - options...` With csh it is preferable to use the following command in your .login file to initialize the TERM and TERMCAP environment variables at the same time. eval `tset -s options...` It is also convenient to make an alias in your .cshrc: alias tset 'eval `tset -s !*`' This allows the command: tset 2621 to be invoked at any time to set the terminal and environment. Note to Bourne Shell users: It is not possible to get this aliasing effect with a shell script, because shell scripts cannot set the environment of their parent. (If a process could set its parent's environment, none of this nonsense would be necessary in the first place.) These commands cause tset to place the name of your terminal in the variable TERM in the environment; see environ(7). Once the terminal type is known, tset engages in terminal driver mode setting. This normally involves sending an initialization sequence to the terminal, setting the single character erase (and optionally the line-kill (full line erase)) characters, and setting special char- acter delays. Tab and newline expansion are turned off during transmission of the terminal initialization sequence. On terminals that can backspace but not overstrike (such as a CRT), and when the erase character is the default erase character (`#' on standard systems), the erase character is changed to BACKSPACE (Control-H). The options are: -ec set the erase character to be the named character c on all terminals, the default being the backspace character on the terminal, usually ^H. The character c can either be typed directly, or entered using the hat notation used here. -kc is similar to -e but for the line kill character rather than the erase character; c defaults to ^X (for purely historical reasons). The kill characters is left alone if -k is not specified. The hat notation can also be used for this option. -ic is similar to -e but for the interrupt character rather than the erase character; c defaults to ^C. The hat notation can also be used for this option. - The name of the terminal finally decided upon is output on the standard output. This is intended to be captured by the shell and placed in the environment variable TERM. -s Print the sequence of csh commands to initialize the environment variables TERM and TERMCAP based on the name of the terminal finally decided upon. -n On systems with the Berkeley 4BSD tty driver, specifies that the new tty driver modes should be initialized for this terminal. For a CRT, the CRTERASE and CRTKILL modes are set only if the baud rate is 1200 or greater. See tty(4) for more detail. -I suppresses transmitting terminal initialization strings. -Q suppresses printing the ``Erase set to'' and ``Kill set to'' messages. If tset is invoked as reset, it will set cooked and echo modes, turn off cbreak and raw modes, turn on newline translation, and restore special characters to a sensible state before any terminal dependent processing is done. Any special character that is found to be NULL or ``-1'' is reset to its default value. All arguments to tset may be used with reset. This is most useful after a program dies leaving a terminal in a funny state. You may have to type ``<LF>reset<LF>'' to get it to work since <CR> may not work in this state. Often none of this will echo. EXAMPLES
These examples all assume the Bourne shell and use the - option. If you use csh, use one of the variations described above. Note that a typical use of tset in a .profile or .login will also use the -e and -k options, and often the -n or -Q options as well. These options have not been included here to keep the examples small. (NOTE: some of the examples given here appear to take up more than one line, for text processing reasons. When you type in real tset commands, you must enter them entirely on one line.) At the moment, you are on a 2621. This is suitable for typing by hand but not for a .profile, unless you are always on a 2621. export TERM; TERM=`tset - 2621` You have an h19 at home which you dial up on, but your office terminal is hardwired and known in /etc/ttys. export TERM; TERM=`tset - -m dialup:h19` You have a switch which connects everything to everything, making it nearly impossible to key on what port you are coming in on. You use a vt100 in your office at 9600 baud, and dial up to switch ports at 1200 baud from home on a 2621. Sometimes you use someone elses terminal at work, so you want it to ask you to make sure what terminal type you have at high speeds, but at 1200 baud you are always on a 2621. Note the placement of the question mark, and the quotes to protect the greater than and question mark from interpretation by the shell. export TERM; TERM=`tset - -m 'switch>1200:?vt100' -m 'switch<=1200:2621' All of the above entries will fall back on the terminal type specified in /etc/ttys if none of the conditions hold. The following entry is appropriate if you always dial up, always at the same baud rate, on many different kinds of terminals. Your most common terminal is an adm3a. It always asks you what kind of terminal you are on, defaulting to adm3a. export TERM; TERM=`tset - .PP If the file /etc/ttys is not properly installed and you want to key entirely on the baud rate, the following can be used: export TERM; TERM=`tset - -m '>1200:vt100' 2621` Here is a fancy example to illustrate the power of tset and to hopelessly confuse anyone who has made it this far. You dial up at 1200 baud or less on a concept100, sometimes over switch ports and sometimes over regular dialups. You use various terminals at speeds higher than 1200 over switch ports, most often the terminal in your office, which is a vt100. However, sometimes you log in from the university you used to go to, over the ARPANET; in this case you are on an ALTO emulating a dm2500. You also often log in on various hardwired ports, such as the console, all of which are properly entered in /etc/ttys. You want your erase character set to control H, your kill character set to control U, and don't want tset to print the ``Erase set to Backspace, Kill set to Control U'' message. export TERM; TERM=`tset -e -k^U -Q - -m 'switch<=1200:concept100' -m 'switch:?vt100' -m dialup:concept100 -m arpanet:dm2500` FILES
/etc/ttys port name to terminal type mapping database /etc/termcap terminal capability database SEE ALSO
csh(1), sh(1), stty(1), ttys(5), termcap(5), environ(7) BUGS
The tset command is one of the first commands a user must master when getting started on a UNIX system. Unfortunately, it is one of the most complex, largely because of the extra effort the user must go through to get the environment of the login shell set. Something needs to be done to make all this simpler, either the login(1) program should do this stuff, or a default shell alias should be made, or a way to set the environment of the parent should exist. This program can't intuit personal choices for erase, interrupt and line kill characters, so it leaves these set to the local system stan- dards. NOTES
For compatibility with earlier versions of tset a number of flags are accepted whose use is discouraged: -d type equivalent to -m dialup:type -p type equivalent to -m plugboard:type -a type equivalent to -m arpanet:type - prints the terminal type on the standard output -r prints the terminal type on the diagnostic output. 4th Berkeley Distribution March 28, 1997 TSET(1)
All times are GMT -4. The time now is 06:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy