VT Terminal Emulation on Mac OS X
There's no Compose key on a Mac OS X MacBook Pro or Apple keyboard, meaning you have to deal with a different keyboard sequence in Terminal.app to get characters such as ü — but you can get these sequences and you can get to an OpenVMS LK-style keyboard function keypad for use with OpenVMS.
Unfortunately, there is no simple, good VT-series terminal emulation provided within Mac OS X; there's no good out-of-the-box DIGITAL (VT100, VT102, VT220, etc) emulation readily available. Yes, you can patch this all together, using either Terminal.app or an add-on terminal emulator.
For Mac OS X use with OpenVMS, there are two tools you'll probably want to enable in Terminal.app, and there's also a Terminal.app keyboard setting.
From the International settings in System Preferences, select the character palette and the keyboard viewer. From within this panel, you can make these two input menu items visible on the Apple menu bar, as well. This selection allows you to get to the character palette more quickly, and the keyboard viewer allows you to directly see the characters available when you press the control (ctrl), function (fn) and options (opt) keys, for instance.
The following are examples of direct keyboard input. For those familiar with DIGITAL terminals in the VT-series or compatible and the associated LK-series keyboards including the LK411, this works akin to the Compose key mechanism.
| Introducer | Generates | Example |
|---|---|---|
| Option-c | cedilla | ç |
| Option-e letter | acute | É |
| Option-g | copyright | © |
| Option-i letter | circumflex | Ô |
| Option-n letter | tidle | ñ |
| Option-q | oe ligature | œ |
| Option-u letter | diaeresis; umlaut | ü |
| Option-1 | inverted exclamation | ¡ |
| Option-2 | Euro | € |
| Option-` letter | grave | À |
| Option-? | inverted question | ¿ |
The above table assumes the Mac OS X US keyboard and the Mac Roman character set.
For the Keypad setting within Terminal.app…
Within Terminal.app, select Preferences, select Keyboard, and select the VT100 keypad. This setting causes the keypad to generate the classic VT-series terminal control sequences from an LK-series keyboard, or compatible.
To select to the numeric keyboard on the MacBook, hold the function (fn) key, or switch to the keypad using the F6 numlock key. Function also enables forward delete; fn-delete. In conjunction with the Keyboard preferences, fn will select the keypad for the EDT and LSEDIT text editors, the Debugger and other common OpenVMS tools.
Now here's the ugly part of Terminal.app: the PF series function keys PF1, PF2, PF3 and PF4. By default, these are F1 through F4, way off the keypad on the MacBook and MacBook Pro series. (You might expect F6 through F9.) Second, the MacBook function keys grab these for uses including the screen backlight. Ok, so you can get these keys back through the System Preferences panel Keyboard and Mouse settings, around routing these to software. Once selected, this means you have to use fn F1 to get to these MacBook hardware functions. It also means you're toggling fn to get to the numeric pad, and off to get at the F1 key. But you can get to the auxiliary keypad PF keys.
You can apparently fix most of (all of?) these shortcomings with the Terminal .term file mechanism, if you want to go that route.
Alternatives include the DataBeast terminal emulator, and emulator tools such as iTerm. For serial access (via EIA-232 RS-232 communications port or a USB serial adapter), QuickTerm and Zterm are common choices. Or the integrated screen tool.
For Microsoft Windows, the VTstar terminal emulator provides as good an emulation as is available, though lacks ssh and more modern capabilities. The VTstar tool is available on the OpenVMS Freeware V7.0 distribution.
What's missing here? Apple Simplicity. Terminal.app should have an emulation selector. And this should select the top-row function key behavior, the keypad, and as much of the emulation as can match up with the iMac or other external keyboard, or with the MacBook or MacBook Pro laptop keyboard. It would also be useful to have the ability to select profiles that allowed directly connect with a target via telnet, ssh, serial connection; to allow Terminal.app to be (selectively) more than just the gateway into the Mac OS X shell itself.
There exists a strong temptation to download the sources to Terminal.app, and (try to) fix this mess.
Should you have suggestions on terminal emulation options, do comment or do contact here.
iTerm Version 0.10
iTerm Version 0.10 update is available if you head over to iterm.sourceforge.net, but apparently not if you're running the update check from within iTerm. (I'd missed this update entirely, though one of the regulars here passed along an email mention; thanks!)
Ukelele
If you're looking to customize, have a look at John Brownie's Ukelele; a keyboard layout editor.
Keyspan USB to Serial Adapters
I'm presently running TrippLite Keyspan USB to Serial adapters (USA19HS series) for EIA-232/RS-232 serial access from a Snow Leopard 10.6 MacBook Pro box to OpenVMS and other boxes; these adapters are a little pricy, but they do work and are integrated with Mac OS X.
As is typical with serial communications, the screen tool is handy.
Here are some related details.
Ergodex build-a-keyboard
Ergodex makes a build-it-yourself keyboard that might be an interesting addition to the world of terminal emulation.
I don't know much about this widget but it looks like it might be some fun to play with. Perhaps one could stick on keys and program them to take the place of whatever favorite key(s) happen to be missing from whatever main keyboard is being used.
It has software support for both Windows and OS X. (Somehow they overlooked VMS, though. :-)
(For Windows I'd probably define a single keystroke for ctrl-alt-delete, then shut down. Or better yet, if it were possible, a single keystroke to delete a non-Mac system altogether and install a shiny new Mac in its place.)
VT100 keypad setup?
You said:
"Within Terminal.app, select Preferences, select Keyboard, and select the VT100 keypad. This setting causes the keypad to generate the classic VT-series terminal control sequences from an LK-series keyboard, or compatible."
Looking in Terminal on an OS X 10.5.4 system, when I go to Preferences / Keyboard I see a list of key/action pairs, but no place to set VT100 keypad as such. Has something changed, or do I just not understand?
What I want is to emulate a VT series terminal well enough to use it on VMS, including the keypad in VMS Notes and EDT and/or TPU in the customary way.
I would be willing to use Terminal, or maybe iTerm if I could figure out how to do what I need.
So far I have had no luck figuring out how to configure xterm to do this and it looks like that might be a challenge....
Ideas? Help?
Mac OS X Terminal.app and the Function Keypad
I'm here distinguishing function keys, the main keyboard, the editing keypad, and the numeric keypad; the lattermost two collectively as the keypad. I'm also using Chord to indicate two (or more) keys that are pressed together, and the word Then to indicate keys that are pressed in sequence.
The prefix KP is used as a shortcut prefix to identify a Keypad key; KP1 is the Keypad 1 key, as differentiated from the top-row 1 key on the main keyboard.
The following was tested with and applies to Mac OS X 10.5.4 Leopard client and Mac OS X Server 10.5.4, and to the embedded keypad on a MacBook or MacBook Pro. Quite possibly to other Mac OS X releases and configurations, too.
Keypad editing sent me along to vim in general, as the keypads are embedded on some keyboards on some systems, and the feature has been entirely dropped on others. I've found vim at least as capable as the DECset Language Sensitive Editor (LSEDIT), and it is available everywhere. Easily more capable than the classic EDT editor. I've been using vi and then vim in the background for a very long time, so that (local) choice was something that was obvious for me. There are many good editors to choose from.
As for Terminal.app, the path is Preferences > Settings > Advanced > start selecting the usual VT100 settings.
Within the DEC Notes conferencing software, basic navigation without using the keypad is available. See the table below for the core commands. Note that these commands shown in the table are deliberately shown by a shorter abbreviation. Nothing precludes you from entering the full NEXT UNSEEN rather than the N U sequence shown, for instance.
Rather more commonly now than the Notes> prompt and the command mode interface, I use a Notes-News/NNTPD gateway, and a client such as Thunderbird. Notes-News/NNTP gateways are operating at both DECUServe and at the Deathrow cluster.
The available terminal emulators usually (and reasonably) map the functions onto the keys with the matching legends, and not onto the key at a particular keypad position. My use model has me expecting the function at a certain position and not by legend; I'd been using LK201 and its descendants sufficiently long that I have no idea what's printed on the keypad keys without stopping and looking at it. My finger memory knows where the necessary keypad keys are; I use the position and not the legend.
Emulation by legend is slower and requires more thought than emulation by position. And terminal emulators and keypad differences usually make that position-based keypad navigation far more difficult. At least until you recognize where the new position is.
To get VT100 emulation within Terminal.app, select the VT100 checkboxes in the Advanced (above), and set the terminal the Declare itself with a VT102 response, then (if you're using a MacBook Pro or such (though the newest of which lack an embedded keypad), use the Fn function key to select the keypad key of interest. If you're not sure exactly what you're getting when you press a particular key, launch System Preference > International > Input Preferences, and select Show Input Menu in Menu Bar. You'll get a new icon up topside (eg: a US Flag if you have the US Keyboard selected) and use that to launch the Keyboard Viewer.
The following is the EDIT /EDT cut and paste sequence using Terminal.app set as a VT102/VT100 terminal. DECset LSEDIT with the EDT keypad selected uses the same sequence. The example assumes you have invoked EDT or LSEDIT on an existing file of at least a couple dozen lines of text, and assumes the use of an embedded keypad on a MacBook or MacBook Pro.
As an alternative, iTerm and the X11 xterm can also be pressed into service.
Given the embedded keypad differences and variations, and the various differences among the available physical keypad layouts, using the keypad keys on an emulator (no matter how good) always slowed me down. Which is why I traditionally have used a real LK461.
Absent an LK-series keyboard, I could choose to learn the emulated positions with the classic OpenVMS tools for the particular emulator, or I could migrate to keyboard-based and multi-platform tools (eg: vim, emacs, pico/nano), Notes command mode for those few sites not already running a gateway and not amenable to one, and (where needed) EDT and LSEDIT command mode. I chose the latter course.
Both DECUServe and Deathrow have vim ports installed.
No new(er) MBP available for no-keypad testing
If somebody reading here has a more recent model of MacBook Pro — one without the embedded keypad handy — please post up a reply or three around that configuration and its (lack of) numeric keypad, and around what happens (if anything) with the numeric keypad sequences described above.
Terminal Emulation - (Windows)
I've been able to get PuTTY to behave in a respectable maner with OpenVMS 8.3, including ssh. The settings in particualr that seem to work for me are basically the default settings with a few exceptions:
Under "Terminal" settings, set the keyboard and function keys to "VT400", the "Home and End" work under rvxt or standard settings, with the HOME key mapping to "INSERT_HERE" and the END key mapping to "PREV_SCREEN". This seems odd to me, but it also seems to be pretty consistant across emulators.
For VT compatibilty, PuTTY seems to do the job pretty well, though it has problems with protecting areas on the screen, and the VT300 and above insert characters thing sometimes has an problem. You can do signifigant key remapping with Putty, based on the scan codes the keys produce though.
It's free, and you can redistribute it with applications if you wish, guaranteeing the user the experience you expect him or her to have. :)
You can download PuTTY here.
-Paul
PuTTY is Windows and Unix GTK/X11
PuTTY didn't and hasn't fully made it over to Mac OS X, though I see a Unix (GTK/X11) distro that would probably work (under X11) on Mac OS X.
If you're working on Microsoft Windows, certainly PuTTY — and the Freeware VTstar package — are good choices.
Under X11, there already exixts xterm, and some other options are available.
GLterm
My preferred terminal emulator on Mac OS X for connection to OpenVMS is GLterm, a very inexpensive (10 USD) shareware package available at:
http://www.pollet.net/GLterm/
It is small, fast, and reliable, and does a pretty fair job with VT102 emulation. It has not been updated in awhile but I've had no trouble with it across numerous OS X updates and upgrades. I've only found one bug, which is that the sequence:
ESC [ 0 ; 0 r
which I believe is intended to set the scrolling region to the entire screen, actually sets it to one line at the bottom. I'm not entirely sure whether sending zeros for both coordinates is documented or defined, but I have seen it done with the expectation that it would restore full screen after various fiddling with the scrolling region.
I can't report success with any equivalent to the Compose key, though I've never particularly looked for one. The PF1-KP3 special insert feature in TPU with the EDT keypad has nothing to recommend it except that I learned how to use it a very long time ago and have been too lazy to learn a better way, but it does get funny characters into your text editor if you need them and know their codes.
I should mention that my experience is with a full-size Apple keyboard, the main advantage of which in this context is that the keypad (unlike those on PC keyboards) has the exact same number of keys and layout as on an LKxxx keyboard.
I commend the impulse to obtain the sources for Terminal.app and coerce it do Do The Right Thing, but it's not clear to me whether those sources would be available in Darwin as opposed to the proprietary GUI. It might be easier to get involved with iTerm.