Introduction

This archive contains a very simple script for freezing the Braille display when you are particularly active with the cursor, editing a document, and then restoring it to normal once you are ready to read the display. This was intended to help reduce wear and tear on the Braille display, as people arrow around.

Background

Most functionality in JAWS is implemented using scripts. There is a structure to how JAWS decides to run a script file. The core functionality is implemented in what are called default scripts, and those reside in file default.jss. In addition, jaws will also pick up any custom scripts for the application that currently has focus, and use those in addition to the defaults. If some identically named code resides in both versions, then the application-specific version is used. So, the defaults are the basis, and the application scritps are the customization.

In addition, either of those, default or application, can actually be a collection of related helper files. And, if you look at the factory supplied default.jss, you will see several use statements near the top of default.jss, which instructs jaws to go get the files mentioned with a use statement, and add them to the current file. In this case, we will add a use statement to default.jss to tell jaws to also pick up our suspendBraille script.

There are two main types of script files. And, it is important to remember which type you are dealing with when using the JAWS Script Manager:

  1. Shared Settings - These are the files supplied with JAWS from the factory. Generally, these should not be edited, except as otherwise noted, and they reside in their own folder. You can get to that folder if you find your current version of JAWS in the Windows start menu, drill down into the jaws utilities, Explore Jaws, open that, and look for Explore Shared Settings. Press enter on that to open that folder
  2. User Settings - This is where your custom files go. These are your files. Again you can get there through the JAWS start menu item, under Explore JAWS, Explore My Settings. The path to that folder is something like:
    C:\Users\Username\AppData\Roaming\Freedom Scientific\JAWS\2022\Settings\enu

The Script Manager

JAWS Scripts are originally written as text files, with a .JSS extension. You can use any text editor to create them. But, the easy way to edit them in JAWS is through the Script Manager, which is a text editor with special capabilities.

To open the script manager, you can press jawsKey+0 on the numbers row, or you can Bring up the list of managers with jawsKey+f2, and pick it from there. The script manager usually opens with the JSS file for the application with focus, and you won't need to edit that in this case, so just press control+f4 to close that file. We'll use the file menu to open the files we need.

Once you write a .jss file, it is humanly readable, but not yet usable by JAWS. you must press control+s to save the file, which causes the script manager to read the jss file, compile it into machine code, and store the result in a .JSB file, which stands for Jaws Script Binary.

Jaws has a mechanism for alloing one JSB file to reference another, such that all referenced files can be used as a collection. We will use that mechanism to compell jaws to use our new script file as a part of it's default scripts, which should be available in all applications.

Installing

These are the manual steps you will need to perform, and these should be applicable to most scripts of this kind.

Step 1: Copy The Files

The script files we will add in this case are called SuspendBraille. the archive includes a few files of various extensions, so Copy all the files in this archive into the user settings area. Again you can traverse the jaws tree in the windows Start menu, to find Explore My Settings to find that folder.

Step 2: Connect Your scrips to the default scripts

When it comes from the factory, the default.jss file resides only in the Shared settings area. There is no file by that name in the user area. However, many developers that provide additional features that need to be accessible from anywhere will create a file by that same name in the users area, and they will put a use statement in there that tells jaws to go get the factory-supplied default.jsb file. So, you may or may not have a default.jss file, or you may need to create one. We'll talk about each of those cases separately.

To determine whether or not you already have one, Open the script manager, and use the file menu, down arrow until you hear, open user file, and press enter. Now, you are in a standard file open dialog, and can explore for that file. If you have one, open it.

You Already Have A User Default.jss

In this case, this file will contain one or more use statements, referencing various files, and you need to add your own to the bottom of the list. Arrow down past the last use statement, and on a blank line, type the following:
Use "SuspendBraille.jsb"
Now, press control+s to recompile.
that's it, you are done with step 2.

You do not have a user Default.jss

You can create a new file with the script manager, with control+n, and then pick source as the file type. However, some people say that, when they try to save that file, they get asked if they want to overwrite. That question should not arise since you know you do not have a user file by that name. So, in any case, do not overwrite, since if you overwrite your shared settings version of that file, you will have a bit of a mess on your hands to straighten that out. So, if you get that question, just say, no.

A safe way to do that is simply write the script in notepad and save it in a safe place, as default.jss.

Here is the contents of your new default.jss. You can simply copy these 4 lines into a blank file.

Use "default.jsb"
Use "SuspendBraille.jsb"
Function Filler()
EndFunction

once you save that file, you can copy it into your user settings area, and there will be no question about overwriting, since you know there is no file in there. Now, you can open it with the script manager and compile it, with control+s.

Step 3: Add A HotKey

The final step it to connect a hot key to your script. There are actually two separate scripts in the suspendBraille file, but one of them is internally tied to jawsKey+UpArrow, or the SayLine command. the other, you get to define, and is for suspending, or resuming braille.

There are multiple ways to add a hotkey, You can use the keyboard manager, and add a new script to the default assignments. Or, you can open a copy of file default.jkm with a text editor, including Notepad, or the script manager. If you don't have a copy of that in your user settings, you can get a copy from the shared settings, and copy it over there, and then edit as needed. JAWS will give priority to your user settings over the shared settings. If you edit that manually, notice that the jkm file is broken into sections, where the section names are in brackets. It is best to put keys like this in the Common Keys area, which is usually the first section.

For example, if you wanted to assign the scritp to toggle the braille sleep mode to the hot key alt+grauv, you would enter the following line into default.jkm:
alt+`=SuspendBraille

Sounds Or Speech

You can choose what kind of confirmation is issued when you toggle the display mode. By default, JAWS will say "suspended", or "resumed, to identify the new state of the display. However, two sound files are included, which can be a less obtrusive way to confirm the state. To use the sounds, you must use the script manager to edit user file SuspendBraille.jss.
Find the line that says:
cn_sounds = 1
and change the 1 to a 0, then press control+s to recompile. Now, jaws will play unique click sounds instead of speaking when the state is changed.

There are two sets of sounds provided. To find them, Go into the user settings area in jaws, and look for files named, BrailleSuspended, and BrailleResumed. Those are the files that get played, So, if you prefer to provide your own sounds, just replace those files, and you will be all set.

Sample Usage

Maybe you cursor to a line of text you want to maintain on the display, while you cursor elsewhere.
Take the cursor to that line, and Press the hotkey you have assigned to scritp SuspendBraille. Braille will be suspended, but will continue to show the current text. However, as you move about, even alt+tabbing to other applications, braille will not update.
If you come to a line that you would like to have displayed, you can exit sleep mode by running the script again. That would free up the display to track your cursor as normal. However, if you want to stay in sleep mode, but just update the display on a one time basis, you can press the sayLine command, and the display will be updated to show the line containing the cursor, and then go back to sleep.

Contacting the Author

This file may be updated if better ways are discovered. Maybe you inow of one.
This mechanism is dirt simple, and the author makes no claims whatsoever.

You can contact the author by writing to snowman@Snowmanradio.com