Skip to main content Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Backspace and delete key behaviour on OpenVMS

Published: 09-04-2018 | Author: Remy van Elst | Text only version of this article

Table of Contents


(You can read all my OpenVMS articles by clicking the picture above)

While working on the DECUServe OpenVMS system I found out quickly thatpressing BACKSPACE moves the cursor on the shell to the beginning of the lineinstead of deleting the character to the left of the cursor. This made me veryaware of my typing, since when I made an error I had to retype the entire line(the terminal is in insert mode it seems). After reading through somedocumentation it seems that is default behaviour but there are terminal optionsto change it.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

DCL (shell)

OpenVMS uses the DCL shell, short for Digital Command Language. It appears thatDCL is an attempt to have one shell for all systems of DEC, so that one only hasto learn one shell environment usable on many systems.

I use SSH to connect to the DECUServe system and doing that from a linuxcomputer I had no problem with backspace. As in, the backspace key removes thecharacter left of the cursor.

From a windows system with Putty for SSH, I noticed that the Backspace key movesthe cursor to the beginning of the line. The terminal is set on insert mode, soI had to retype the entire line when making a typo. The delete key was also ofno help, it didn't seems to do anything.

Since I often work with network devices such as switched, I resorted to thefamous CTRL+H key combo. That also moved the cursor to the start of the line.I was hoping it would remove a character.

Terminal input features

The first clue came when I read this documentation on shell features suchas go to the end or beginning of a line. Like CTRL+A and CTRL+E in bashemacs mode (default).

To correct a typo when the shell is in BACKSPACE to the start of the line mode,I used the CTRL+J key combo. That deletes an entire word. So I pressedbackspace, ended up at the start of the line and either using the arrow keys orCTRL+E (go to the end of the line) I went back to the typo and pressedCTRL+J to remove the word and redo the typo.

I also found out that the DCL by default is in overwrite (insert) mode. Thasmeans that when you move the cursor to a place in a word and start typing, thecharacter underneath the cursor is overwritten. The alternative (append mode)means that the characters are placed before the character under the cursor andnothing is overwritten.

To switch these modes in the DCL shell, use CTRL+A. I was unable to find avisual indicator to show which mode you are in. This combo also works in theEVE editor by the way.

Not an optimal situation to be in regarding typing. It is quite cumbersome whenyou are used to certain backspace key behaviour.


Reading more documentation on terminal options I found the specific optionI was looking for:

/BACKSPACE=keywordControls how the system responds to the backspace key (Ctrl/H) in line editing mode. There are two possible keywords:    BACKSPACE (default) --- The terminal driver returns the user to the beginning of the line. (This is the traditional way OpenVMS has always worked.)    DELETE --- The terminal driver interprets the backspace key as a delete character instruction.    Note the following exceptions:        If the terminal is set in PASSALL or PASTHRU mode, the backspace key is not interpreted as a delete character instruction.        If the user issues an IO$_READVBLK with IO$M_NOFILTR or IO$_READPBLK, the backspace key is not interpreted as a delete character instruction. You can use SYSGEN to make /BACKSPACE=DELETE the default for all terminals by setting the system parameter TTY_DEFCHAR3 to 16.If the default is set to DELETE, the user can still go to the start of a line by pressing F12 or by entering the following sequence: Ctrl/V Ctrl/H Ctrl/H. 

So using the following command one can make their backspace key remove acharacter left of the cursor:


After which to my pleasure, the backspace key works as I want it to work. Evenin EVE, the editor.

Make it last

I want this to be my default and on linux I'm used to placing stuff in the.bashrc or .profile to be executed at every shell login. OpenVMS has such athing, namely LOGIN.COM in your home folder.

On the DECUS system there already was stuff in there, so I only added my line onthe most logical place. This is the specific line:


Using the EVE editor:


This is the complete file with my changes:

$! Template procedure for DECUServe users.$ set noon$ ! Remove the following line if you want to use DECWindows Notes$       NO*TES :== NOTES/INTERFACE=CHARACTER_CELL$ if f$mode() .nes. "INTERACTIVE" then goto end_interactive$ ! Place commands to be executed only in interactive mode here:$ set terminal/inquire/noeightbit$ update_notebook  ! Spawned update of the MAIN class in your Notebook.$end_interactive:$ ! Place commands to be executed in all modes here:$ show quota$ SET TERMINAL /BACKSPACE=DELETE$ exit

Saving it with CTRL+Z, then logging out (with LOG) and logging back in, mybackspace key now always is just the way I like it.

Tags: alpha, blog, dec, decus, itanium, openvms, pdp, simh, vax, vms