SAM Driver for the Pegasus Braille Controller and PegasusDW  Dual Watch

This is a fully functional SAM driver for use with the Pegasus Braille Controller.

Please report any bugs to Henk Jansen
(jzhenk@ctv.es). If it crashes please tell us the crash address and registers etc, from the crash message box, also report the driver version number (check with explorer - file properties).

Features
Automatic detection of Braille displays on Serial and USB ports.
Direct keyboard input mode.
For explanation of this key simulation mode see the file: PBC_DWKeys.TXT

Notes
It is recommended NOT to use a blinking cursor.
Working this way enables the Pegasus to switch off all braille dots when not in use for a longer time, just as a screensaver does on a PC. 
Doing so, saves the lifetime of the piezo cristals and also batterytime on portable PC's

Key assignments for the Pegasus DUAL WATCH:
The keys on the navigation part of the Pegasus are grouped into 4 blocks.
The Control Keys: 
These are the 2 keys at the left side and the right side of the navigation pad.
They modify all other keys if necessary. They are called:
Left Shift, Left Control, Right Control and Right Shift.
Just as is with a normal computer, FIRST the control key must be pressed , hold down, and then the second key has to be pressed. Te sequence of releasing the keys is not important. 

The Block Keys:
This are the keys that are arranged in a rectangular block, and the keys, arranged in the diamond shaped block. These keys are used for navigation purposes and special purposes.
Standard they all have the same function. 
Only when the Left Shift key is applied, the diamond shaped blocks have numbers from 1 to 4 (or 1 to 8 on the 80 char Pegasus)  and have different use, as described below.

The keys on the navigation pad of the Pegasus have following key names:
From left to right.

[Left Control keys]; [block keys]; [Right control keys]

Rectangular blocks:
[Home]	[Esc]
[Enter ][End]

Diamond-shaped blocks:
	[Up]
[Left]		[Right]
	[Down]

Standard is the Navigation mode where all Blocks and Diamonds have the same function:

Standard Navigation mode: (All keys)
[Home]	= 	go to  upper left part of window
[End]	=	go to  lower left part of window
[Esc]	= 	go to place where cursor lives
[Enter]	=	Left Mouseclick .

[Up]	= 	move Braille display 1 line up
[Down]	=	move Braille display 1 line down
[Left]	=	move Braille display 1 display length left.
[Right]	=	move Braille display 1 display length right.


Extended Navigation mode:
[L-Shift + Down ]  	= 	Free.
[L-Shift + Home ]  	=	move to begin of current line
[L-Shift + End]	  	= 	move to end of current line.
[L-Shift + Left]  	=	move brailledisplay 1/2 length left
					When key simulation is ON this is 1 length
[L-Shift + Right]  	=	move braille display 1/2 length right.
					When key simulation is ON this is 1 length
*[L-Shift + Up(1-8)]  	=	Cursor Routing to above key UP{1-8}
*[R-Shift + Up(1-8)]  	=	same for left handed people
[L-Shift + Enter]  	=	Double Left  mouse click 
[L-Ctrl   + Enter]  	=	Right mouse click (1x)
**[L-Shift + Esc]	=	Free   
* and ** ==  more explanation at end of document

SWITCH  commands
They use the Left Control key. [L-Ctrl] together with another key.
[L-Ctrl + Up]		=	Switch to Attribute 1 mode
[L-Ctrl + Down]		=	Switch to Attribute 2 mode
[L-Ctrl + Left]		=	Switch to Status report mode
[L-Ctrl + Right ]	=	Switch to configuration dialog.
[L-Ctrl + Esc]		= 	Switch to choice of different cursor representations
**[L-Ctrl + End		= 	Free
***[LCtrl+Home]		=	Switch to the Pegasus internal Menu

Toggle (On/Off) switches
[R-Shift + Home]	=	8 dots braille on/off
[R-Shift + End]		=	Skip empty (braille) lines on/off
[R-Shift + Enter]	=	Vibrating Capitals on/off
[R-Shift + Esc]		=	Show cursor
[R-Shift + Right]	=	Sounds on/off
[R-Shift + Left]	=	Lay-out mode on/off
[R-Shift + Down]	=	Dot8 at special characters

The internal Pegasus Menu:
You can switch TO the Pegasus internal menu by pressing the LCtrl key Together with the Home key.  [LCtrl+Home]
There you can cycle through the menu lines with the Up, Down, Left or Right  key. 
You leave the menu without changing an option with the Esc key
You leave the menu AND change an option from ON to OFF or vice versa with the Enter key.
You leave the menu automatically as soon as a braille line is received from the PC.
 There are 4 menu lines.
Line1: shows the Serial number and the internal braille table used by internal translations.
Line2: shows the version of the internal program and the name of the development company.
Line3: shows the state the key simulation. (ON/OFF see Key simulation below)
Line4: shows the state of the Teach mode. Enter changes the ON/OFF state.

Cursor Routing:
Cursor routing can be done in 2 ways. The standard way with the routing buttons is used most. If you have no routing buttons, you can do routing the following way:
Press [L-Shift + Up(1-8)]   Or [ R-Shift + Up(1-8)]   (for right and left handed people)
The cursor comes right above the Up key that you pressed. This way, you are always about 5 places away from where you want to go on with your work.

The Left Shift key: 
This key is used in 2 ways.
When used alone it switches ON or OFF the key simulation mode.
When used together with another key it changes the function of that key only for one time.

Key simulation:
This mode is introduced for your convenience. Working this way you need not place your hands from the Braille display to the computer keyboard and back.
When this mode is switched ON: 	(Pressing LEFT Shift key )
The first status cell always represents  Dot7+Dot8.
You can also verify this by going into the menu line #3 where is displayed:
Key Simulation mode is: on  (or off)    

When key simulation 	is on:
[Home]	acts as the computer  keyboard key:  Home
[Esc]		,,	,,	Esc
[End]		,,	,,	End
[Enter]		,,	,,	Enter
[Up]		,,	,,	Arrow Up
[Down]	,,	,,	Arrow	Down
[Left]		,,	,,	Arrow	Left
[Right]		,,	,,	Arrow Right
Status Router Button 1	acts as the Left Windows key (= Windows Start button)
Status Router Button	2	Switches Windows into its Stand By mode.

All the rest of the router buttons and special buttons, as well as the way how to change all the router buttons to your own preferences you can find in: PBCKEYS.TXT
Which is the file where all standard definitions are. 
NOTE that this file is used by the PBC driver for Super Nova. And if it is not in the same directory all default definitions are used.

When in Key Simulation mode The LShift + UP[1..8] do the same as routerbuttons, while Cursorrouting via Rshift+UP[1..8] stays the NORMAL cursorrouting.
LShift+UP1	= same keysimulation command as is defined under RouterButton  5.
LShift+UP2	= same keysimulation command as is defined under RouterButton 15.
LShift+UP3	= same keysimulation command as is defined under RouterButton 25.
LShift+UP4	= same keysimulation command as is defined under RouterButton 35.
LShift+UP5	= same keysimulation command as is defined under RouterButton 45. 
// only on 80 char below:
LShift+UP6	= same keysimulation command as is defined under RouterButton 55.
LShift+UP7	= same keysimulation command as is defined under RouterButton 65.
LShift+UP8	= same keysimulation command as is defined under RouterButton 75.

When in the key simulation mode there are 2 extra reading commands that do not simulate a key. Those are the commands to place the braille display  one display width to the right or to the left. Those keys are:

[LShift+Left]	= 	move 1 display width to the left
[LShift+Right] 	=	move 1 display width to the right

Nearly all other commands, used together with the Lshift, Rshift or LCtrl key keep their functions in the key simulation mode. Switching off the key simulation mode is done by pressing the Lshift key again.


The special Teach mode:
Switched on and off via Menu line 4.
When this mode is ON all braille characters that are received via the USB connection are sent to the braille display AND also to the serial port of the PegasusDW. This way, a second person can read on a computer display, or on a Pegasus Brailledisplay what is on the student's brailledisplay.
A simple (MSDOS) program that converts the braille back to ASCII and displays it on the screen, can be requested by your dealer.  Teach mode Only works if the main PC works via the USB port and the Control PC is connected via the Serial port of the PegasusDW.
 
NOTES:
All commands marked with * cannot be modified within the Supernova or Hall program. They go directly via the key simulation program and can be modified in the file: PBCKEYS.TXT
Where the router keys are the same as routing buttons
Up-1 same as (can be modified as) Router button 5
Up-2 same as (can be modified as) Router button 15
Up-3 same as (can be modified as) Router button 25
Up-4 same as (can be modified as) Router button 35
Up-5 same as (can be modified as) Router button 45
Up-6 same as (can be modified as) Router button 55
Up-7 same as (can be modified as) Router button 65
Up-8 same as (can be modified as) Router button 75
The modification of the router buttons only takes place when Key Simulation mode is activated. (LShift or via the Menu)

When in Keysimulation mode, the mouseclicks go directly into the keyboardbuffer of the computer. So also the mouse clicks can be modified that way into other commands, mentioned in the PBC_DWKeys.TXT file 

** Free:
Those keys have no default commands in Supernova and can be programmed by the user via the Supernova menu.

*** This key cannot be modified. Its use is ONLY internal in the PegasusDW


