Back in December, I posted a long tutorial on Tera Term with JFW. The
purpose of this post is to update it. If you don't care about terminal
programs, you need not read this.
Tera Term currently is at version 4.62. This still works well with JAWS,
and
nothing about cursor tracking or the terminal window has changed. Be sure
to
choose the compact installation -- the other choices install a lot of
extra
utilities, that though they work fine with JFW, tend to clutter up the
system tray and steal focus.
The website is still
http://ttsh2.sourceforge.jp/
If you google, you will find lots of variants of this program, but the
4.62
version on the Japanese sourceforge site listed above is the most complete
and current.
You still need to make the same adjustments to improve speech and Braille
friendliness. Set the cursor to horizontal line, and not block which is
the
default. Turn off the scroll buffer and set the window size to 80 columns
by
24 rows. Other window sizes are the default and at least for me, they tend
to make the screen unnecessarily harder to read, especially with Braille.
The scroll buffer, if enabled by mistake, which is the default really
messes
up the updating of the JFW offscreen model. If your JAWS cursor shows you
items onscreen that simply are not there, you probably have the scroll
buffer enabled. Remember that even if you don't scroll through the scroll
buffer, it messes up JAWS, so just keep it OFF!
If you wish to see what you previously did it is better to keep a log
file,
and Tera Term can easily automatically log all your activity.
The Tera Term support group which I previously mentioned seems to have
disappeared off the net.
Another free option for telnet/ssh access is PuTTY at
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
The latest release version (beta 0.60) is considered quite stable. The
window size and scroll buffer seem to interfere much less with JFW than
these same features in Tera Term, but it's a bit tricky to get cursor
tracking working well with PuTTY.
By default, the PuTTY cursor is also a block, and by default it blinks. If
you set the cursor to horizontal line (called "underline" in the
interface)
JFW will think you are one space to the right of where the cursor is
actually located. You can make JFW track the default block cursor by
turning
off the blink (which causes Braille to jump around randomly) and creating
a
PuTTY.JCF that has these items:
[OSM]
CaretSearch=255
EditPromptSearch=2
TrackFocusRect=1
CaretTimeOut=1000
VertCaretMinY=25
VertCaretMinX=1
VertCaretMaxY=90
VertCaretMaxX=4
HorizCaretMaxY=4
HorizCaretMinX=4
HorizCaretMaxX=14
[Highlight Colors]
000000000/000255000=1
000000000/187187187=1
187000000/000000000=1
The problem with hacking up a JCF file for PuTTY and its default block
cursor is that the cursor sometimes isn't tracked accurately in text
editors, so if you edit a lot, you might prefer to set it to underline and
deal with the cursor being off by one. At least when the cursor is set to
underline, JAWS reliably knows where it is, even though it is also
reliably
off by one space. I think setting the TrackFocusRectangle thing in the JCF
file, which is what JFW does for Excel, is not the most reliable way to
find
a cursor, but it might be the way to track a cell.
I've also found it helpful to set my terminal to VT100 when I'm editing,
both in PuTTY and on the host, since something about the Xterm settings in
PuTTY confuses JAWS when rapid cursor changes occur. However if you are
reading lots of text-based dialog boxes in Linux, you'll see garbage
characters with the VT100 emulation so you'll want to switch back to Xterm
for that. For what it is worth, I don't have these troubles if the host is
BSD instead of Linux. And this trouble with garbage is not caused by JAWS,
since sighted users confirm that the garbage JFW reads is the exact
garbage
Linux is displaying. Somehow, Linux does not have a terminal definition
that
is exactly meshing with the terminal definition built in to PuTTY or Tera
Term though the problems and symptoms are slightly different.
In general, if rapid cursor changes flummox JAWS and you have a good
internet connection, be sure your terminaln is VT100. If garbage is
onscreen
visually, and you are using Tera term, you are out of luck. If the garbage
is onscreen and you are using PuTTY, be sure your terminal is *NOT* Vt100,
it should be Xterm. PuTTY can switch between Vt100 and Xterm; Tera Term
cannot. Linux defaults to a terminal type called "Linux" which is
supposedly
a Vt100, but its best to set it to Xterm or Vt100 to be sure.
If you are unfortunately trying to both learn Unix and get your terminal
program working with JAWS, you should show this, plus my previous post to
a
more knowledgeable friend or system administrator. For me, trying to
figure
out both at once was a nightmare. It's one of my motivations for
attempting
to create a really stable set of scripts for the two most popular ssh
clients for Windows.
But back to JAWS weirdness. I'm trying to figure out now how to make it
track reliably all the time, and really wish the FS folks would do a
better
job of technically documenting the settings in a JCF file. They should
document how you can diagnose what your cursor settings in a JCF file
should
be configured for, if cursor tracking fails.
If I do come up with better settings, I will post here.
PuTTY has several advantages over Tera Term. The terminal it emulates is
Xterm rather than Vt100, which makes Linux work better remotely. PuTTY is
also very small and simple and there exist three variants which can be run
from a flash drive, so that you can use any PC to log in to another host.
All these variants work identically with JAWS. Google for portable and
PuTTY
to locate them all.
PuTTY also has extra features that only apply to advanced users, but make
it
more adaptable for system administration. PuTTY is more intuitive for
sighted people to configure, but both programs' setup screens are totally
accessible. Neither program has an interface that is beginner-friendly in
my
opinion, but once you figure them out it is quick to set either one up for
logging automatically in to a specific host. PuTTY saves its settings in
the
registry -- unless you're running it portable. Tera Term saves its
settings
in a standard .INI file. Both programs can call up a settings file on the
command line. This makes it possible to create a shortcut to log you in
without you needing to type a user name or password.
Tera Term has two advantages for me over PuTTY. First, there's no fooling
with JCF settings to get cursor tracking working. Second, those .ini files
are plain ASCII, easy to back up and edit. I also find cutting and
pasting
easier, though it's possible to do it with JAWS in PuTTY as well.
The main terminal window in PuTTY has a window class of "PuTTY" and the
same
window in Tera Term has a class of "VTWin32". It is not a good idea to
reassign a new class to these windows. I tried and there's no improvement.
If you are an old DOS user, you'll remember how nice it was to have
incoming
text automatically read aloud, whereas scrolling text remained silent.
Unfortunately, achieving this same effect with scripting doesn't work
perfectly. I tried both techniques for altering the SayNonHighlightedText
function or the NewTextEvent function to automatically voice the contents
of
the window, when a window of that particular class received new text. Both
techniques do cause the contents of the window to be voiced, but the
script
can't differentiate between newly arriving text and scrolling text, so you
hear portions of the text repeated. Right now, using my own buggy
scripts,
I toggle between speaking and not speaking text, and clear the screen
frequently if I want it to read automatically, since I don't have a
perfect
solution yet.
I've spent some time examining all the older, buggy scripts out there for
terminal programs. Many of them rely on frames, or modifying either the
NewText event handler or the SayNonhighlightedText function. Looking at
the
Hyperterminal scripts, I see they do a better, but still not perfect job
of
reading only what you want to hear when "monitoring" is turned on.
However,
Hyperterminal cannot do ssh, and it's blinking cursor also messes up
tracking especially in Braille. Another problem with Hyperterminal,
probably
related to its scroll-back buffer is that the off-screen model sometimes
becomes hopelessly confused, showing garbage when the screen is actually
just fine. The HyperTerminal scripts are a bit incomprehensible to mee --
the scriptwriter doesn't believe in comments -- so I'm still trying to
make
sense of why their alterations to the SayNonhighlightedText function work
so
much better than my attempts.
If you had to use HyperTerminal for some reason, fooling with its screen
size and figuring out if its scroll buffer could be disabled might improve
things a bit, but I hate HyperTerminal's annoying tendency to insist on
your
modem dialing preferences, so I avoid it!
It is worth noting that the default telnet client, telnet.exe is a Windows
console application so it uses the default scripts and the same window
class
as the command prompt. That class is named "ConsoleWindowClass". To speak
information in the command prompt window, the SayNonhighlightedText
function
simply reads the entire window's text if that is the class of the window
which currently has focus. This is the technique I used for the script
snippet I posted on this list in December. Works great for issuing a few
commands, but once the screen starts scrolling, it doesn't read reliably.
Even without JFW scripts, you can edit on your host, as long as cursor
tracking is accurate. If you have a fast internet connection you will hear
the correct line, word, or character read if you press arrow keys and your
host knows what to do with them. On a slow connection, this doesn't work.
On the net you will also find scripts for Secure CRT, a ssh client which
is
not free. These scripts simply use a custom newtext event handler and
there's nothing magic about them. Though I never used Secure CRT, I'd
expect
these scripts to not reliably read only new, incoming text when the screen
scrolled. I tried the same technique stolen from the Secure CRT scripts,
and
got the same results as before; new text was comprised of actually new
text,
plus old text that was scrolling.
At the end of this message, I'll post my current Tera Term script, which
uses the technique taken from the Secure CRT scripts that I jjust
described.
Feel free to forward this to anyone. If you have additional thoughts,
please
post.
--Debee
*** My current Tera Term script (alter the two constants at the top for
PuTTY)
include "HJConst.JSH" ; standard JFW constant definitions
const cTerminalWindowClass = "VTWin32" ; change to "PuTTY" for that
program
const cTerminalProgramName = " Tera Term " ; change to " PuTTY " for that
program
const cMyPassword = "MyBigSecretPassword--NotReally"
globals int bAutoStart, int bIsAutoSpeaking
Script SendPassPhrase ()
TypeString (cMyPassword) ; input password as if typed
EndScript
Void Function NewTextEvent (handle hwnd, string buffer, int nAttributes,
int nTextColor, int nBackgroundColor, int nEcho, string sFrameName)
if ((GetWindowClass(hwnd) == cTerminalWindowClass) && (bIsAutoSpeaking ==
TRUE)) then
SayString(buffer)
Return
EndIf
; else ...
NewTextEvent(hwnd, buffer, nAttributes, nTextColor, nBackgroundColor,
nEcho,
sFrameName)
EndFunction
Function AutoStartEvent () ; turn on the boolean bIsAutoSpeaking
if (bAutoStart != TRUE) then
let bAutoStart = TRUE
let bIsAutoSpeaking = TRUE
EndIf
EndFunction
Script ScriptFileName () ; say the current script file loaded
ScriptAndAppNames(cTerminalProgramName)
EndScript
Script ToggleAutoSpeakingText ()
; Toggles the boolean bIsAutoSpeaking which controls if the window
; is voiced automatically when new text appears
if (bIsAutoSpeaking == TRUE) then
let bIsAutoSpeaking = FALSE
SayString("Automatic speaking is turned off.")
return
EndIf
; else ...
let bIsAutoSpeaking = TRUE
SayString("Now enabling automatic voicing.")
EndScript
For answers to frequently asked questions about this list visit:
http://www.jaws-users.com/help/