Technical Briefs
rohan% stty all
A list of the current settings will display on the screen. The last two lines show the keyboard codes and the keys to which they correspond. All these settings are changeable and can be modified to suit the users specific needs. To use stty to change a key assignment, give it the name of the special character to change and the character that is to be used. To use a control character, type a caret (^) followed by another character, both enclosed in quotation marks. For example, to make the Delete key (represented by ^?) the erase key, at the ROHAN prompt type:
rohan% stty erase '^?'
This will change the erase key from it's previous setting to the Delete key. For the rest of the current session, when the Delete key is hit, it will remove one character at a time from the command line.
To permanently change the settings, it is necessary to change the .login file to reflect the new information. At the ROHAN prompt type:
rohan% vi .login
This will bring the .login file up in the vi editor. The .login files on ROHAN are organized into groups of commands to make the file easier to understand. The most logical place to add stty commands is at the end of the first group of set commands. Position the curser at the end of this group and type:
O
This is a capital O and will open a new line in append mode. Type the following to change the Delete Key to the erase key:
stty erase '^?'
Write and Quit the file. The next time the user logs into ROHAN, the Delete key will be automatically set to remove one character at a time from the command line.
![]()
Send comments/suggestions about this web page to webmaster@rohan.sdsu.edu
SDSU Faculty and Students may send questions about software on ROHAN or ROHAN UNIX problems to problems@rohan.sdsu.edu