Open a Page by clicking a Title on this Navigation Bar: 
  WelcomeContact UsProductsResources  
Minomech Technology
"Mind over Machine" 




Minomech Special Project:
EZKeys Parachute


Automated Escape Method from Morse Code -
A Quick-Change script to switch from
Morse Code to Scanning as a computer input method
Using EZ-Keys and AutoIt scripting language
http://www.minomech.com/techtalk/parachute.html
   
This is a detailed description of a concept presented at RESNA 2004, Computer Applications Show-and-Tell.

The Concept:
Learning alternative computer access methods such as Morse Code can be daunting, as educators and practitioners it is important for us to provide our clients with as much support and independence as possible. Therefore, if we can identify places where someone might get stuck, it is important to develop escape mechanisms, what I call "parachutes". What follows is an example of one such parachute.

The Information on this page is Copyrighted © 2004 by Minomech Enterprises.  Permission is granted to reproduce this information only if it is reproduced in its entirety including this copyright notice and the original web address.  For permission to reproduce an edited version please contact kirk@minomech.com with details of how it is to be used and a full version of the edited text.


Project Details:

Objective: Maximize independent computer access while allowing client to learn and practice alternative access independently.

Access Equipment - Sip and Puff or other dual switch input.
Access Methods - Morse Code (for maximum efficiency) and Row Column Scanning (as an intuitive access method.)
Software - Ez-Keys by Words-Plus and AutoIt scripting language (free software from Hiddensoft)

Note:  I have not tried this with the XP version of EzKeys, if you want to try, you'll need to look carefully at basic file structures, and at the automated keystrokes to be sure it will still work.
If anyone finds out let me know...  We'll put your solution up here too!

EZ-Keys by Words-Plus Website
AutoIt website
If you like you can download the version I use complete with insaller Here - AutoIt V.2
Additional Aids - Custom Cheet Sheets - slender sheets with Morse Code translations to tape around PC monitor.
Click here for Morse Cheet Sheets in PDF format

I'm going to assume you can find your way around the Windows file system whether by using "My Computer" Which I find cumbersome, or by using the Windows Explorer, (WindowsKey + E).

If you want a better way to edit files than Notepad, I recommend Editpad it's free for non-comercial use.
Download EditPad Lite
Once installed I like to put my editor in my Send To folder.  That might be the subject for another Tech Talk, but if you do this, it becomes much easier to look at unusual files using Right-CLick | Send To | Editpad.  If you use Notepad it wants to add ".txt" to your file names making them useless.


The Emergency Exit Concept: In case he gets stuck somewhere and can't remember the right code we gave our client a simple code - seven "dots" in a row which then activated a sequence of events which result in changing from Morse Code as his input method to Row Column Scanning.

This required a scripting language to perform the sequence of events, and understanding how to change EZ-Keys in ways the programmers had not planned for (the proper term for this is Hacking...)

We chose AutoIt as the scripting language since it is free and easy to learn (as scripting languages go.)

Hacking EZ-Keys:
EZ-Keys has a file that determines the default user, when the program opens that user is loaded automatically. The file is usually found at:
C:\EZKWIN\USR\Ezkwin.usr
The USR folder also contains the user folders for specific users, for example Peter or Wendy. These folders contain a number of files with configuration and vocabulary information.  Good software practice is to make a backup of a file before altering it so make a backup of
Ezkwin.usr.  I usually just make a copy in the same folder renaming it Ezkwin.bak or Ezkwin.kbs.  My inistials are KBS so if I make a backup using them, I know who made it...

Hmm, for those having trouble finding the files with those last three letters...  You will find it easier to tell Windows to stop treating you like a baby by hiding those all important endings.  In the Windows Explorer / My Computer  go to the Tools menu, select Options or Folder Options.  You will get a window with lots of setting options.  At the top, select View.  In the advanced settings box you will find an option to "Hide known file types" I guess we're all supposed to have memorized all the icons and trust Windows to show us the way... My memory isn't that good and I don't trust computers.  So make sure this is unchecked; we want to see the full file name, three letter extensions and all.

Now the trick is configuring EZ-Keys for one user in two folders. To make it simpler we start by creating a new user named Morse and configuring EZ-Keys with all the proper settings for our client as a Morse Code user. I'm counting on you to be able to do this already - just remember to call the user Morse not Peter or Mary or whatever your client is named.

Once you are done configuring Morse, you will create another user named Scan configuring all the settings for the scanning method that works best for your client.

Now the Hacking begins, close and restart EZ-Keys. It should open to the Scan user. Now we make a copy of the Ezkeywin.usr file and rename it Scan.usr. This should still be in the same folder as Ezkeywin.usr. You can easily Copy and Paste the Ezkeywin.usr file with keyboard shortcuts - select the file, Ctrl+C, followed by Ctrl+V.  For the mouse users out there, you can get there by Right Clicking the file, selecting Copy, then Right Clicking in blank space nearby and selecting Paste.  After that rename the file
to "Scan.usr" that's another Right-Click option.

Change users to Morse, then close and restart EZ-Keys, you should now be in the Morse user configuration. Again we copy Ezkeywin.usr but this time, since it has changed we name this copy "Morse.usr".

The "Quick-Change" concept:
You can test the change-over concept already if you want.  All we are doing is using a simple copy and paste sequence to change the default start up settings.  Once you have tested this we will use the scripting program to automate the shutdown, reconfigure and restart sequence for Ez-Keys.

Give it a try, re-start EzKeys, at this point it should come up Morse.  Now close EzKeys, delete the
Ezkwin.usr file (remember we have a backup just incase...).  Now Copy (don't cut) and Paste Scan.usr and rename it to Ezkwin.usr.  You can now restart EzKeys; if all went well, it will open to the Scanning settings.  If things just aren't working you can always delete your new Ezkwin.usr and rename the Ezkwin.bak with the ".usr" ending.  Of course, it would be better to use a Copy and Paste if you can...

Automation:
Once you have dowloaded and installed AutoIt, the program will run automatically for any script with the .aut ending.  So we just need to build a script... or you can cheat and use the one's I already wrote -

Download Automation Files Here

You will want to create a folder named c:\minomech\auto and save the file there.  It is a zip file, once you unzip it to the same folder you will get four files - Morse.aut, Morse.bat, Scan.aut, Scan.bat.  (if you are more confident in your "hacking" ability you can put the files into some other folder, but you will need to edit the two .aut files to refer to your new folder.)

Now we are ready to work on automation.

There are two parts to this process, one to automate what runs when, and the second to create something to perform the "Quick-Change".  Since the quick-change deletes and renames files, I stuck with something old-fashioned and reliable: "Batch" files.  I created two batch files, one to change from Morse to Scan and one for Scan to Morse.  These backup the current settings, delete the old
Ezkwin.usr, and then copy the desired file to the same folder with the "Ezkwin.usr" name.
AutoIt will allow us to use a series of keystrokes and timers to shut-down EzKeys, perform the Quick-Change and re-open EzKeys.  If you have some other favorite scripting language it should work just as well- be sure to account for variations in which programs are open during the quick-change.  The last thing we want is to have our solution get stuck between access methods.

The final component of this parachute is to assign hot-keys to the two script files and program those into the access method.  In this case I chose function keys since they can be assigned as "hot-keys" as a single keystroke, which is more efficient.  For the sake of example I will assume you have placed the scripts in C:\Scripts.  Now, create a short-cut on the desktop to the two script files - Morse.aut and Scan.aut.  Right-Click is your friend here as well, if you Right-Click drag the script file to the Desktop you will get several options once you let go; one of which is "Create Shortcut..." another Right - Click, on the shortcut this time and you can alter the Properties of the shortcut.  To be more preciese you can add a hotkey.  This hotkey will work no matter where you are, unless the key has already been assigned somewhere else.

Still with me?  Almost there.  From a Scan mode it is easy to "press" a function key.  From Morse it is not as easy, we just need to create a new Morse Code and assign it to our hotkey e.g. f12.  This is pretty easy to do... When you know how.  In
your user folder,  "Morse" there are several configuration files.  We want to edit the English.mrs file.  Once you open find this line :
Codes= 139 
If you add a code you must add one to this number.  So if we add a quick code for F12 the line becomes:
Codes= 140
Go ahead and change that now.

Now go to the bottom of the file and add this line:
0 , "......." , "{F12}"
You should be able to Copy and Pate it there.  Otherwise be very careful to get all the spaces and punctuation exact.  You have now creatd a Morse Code using 7 dots to "press" the f12 key.
If you want to get creative you can work your way around in here and otherwise customize the Codes to meet your clients needs.  Remember, if you get too creative your client may become dependent on a system that is not easily reproduced when it comes time to replace it!

If you have read this far you are more than dedicted enough to figure out what I'm doing inside the script files, so I'll leave that as a "learning oportunity."  If you get stuck or notice something I have missed, let me know.

Good Luck, and remember to backup your work before, during and after...

At your service,

Kirk
   Siqvland

President
Minomech Enterprises
Edmonds, Washington, USA



  WelcomeContact UsProductsResources