Skip to content

AceCentre/MorseWriter

Repository files navigation

MorseWriter

This is a small system tray app designed in Python to interpret one or two key presses pressed in a set way (morse) and convert them to the key equivalent. This should mean that a user who has good timing can access the entire computer to write and control their machine - potentially with one or two keys or switches. Mouse implementation is flaky right now.

For code, bug tracking and feature requests see https://github.com/willwade/MorseWriter/

Requirements

Currently built for Windows. Let us know how you get on with different variants of Windows. Plan is to port this to Mac at some point.

Install with virtualenv (windows)

# if virtualenv is not installed
# pip3 install virtualenv
# install visual c++ build tools, installing visual studio community version will do it
# install swig and have PATH env pointing to it, swig.org
cd \path\to\MorseWriter
virtualenv -p \path\to\python3 venv
.\venv\Scripts\activate
pip3 install -r requirements.txt
python MorseCodeGUI.py

Make executable with pyinstaller

# python 3.6.6 is supported, currently 3.7 is not working
.\venv\Scripts\activate # if using virtualenv 
# pip3 install pyinstaller
pyinstaller MorseCodeGUI.spec

Usage

  • Download the MorseWriter Application and Code Chart from here
  • Run the MorseWriter.exe
  • Select your options
  • Note the two key option: the key on the left hand pull down menu relates to dit (*) and one on the right relates to dah (-)
  • If you want to use a third key for the return character (removing the need for good timing) then you can do that with the third dropdown
  • Press go
  • Minimise the coding window if needed
  • Minimise the black debug window. NB: If you close it you are closing the app.
  • Note that all normal key entry is now disabled. To halt the script use a mouse to navigate to the system tray icon and quit the app
  • If you want to escape morse entry : ctrl+shift+p will pause it.

Tips for first use

  • Look at the the code chart below or the coding window. Have it handy or print it!
  • Use notepad to test your typing skills
  • To get used to typing you have to first get used to the speed of things. Just try a e and a t for starters.
  • Getting auditory feedback on the key entered may be useful. In which case you may find this additional program of use.

Issues:

  • Debug window needs to be minimised even if debug switched off
  • 1 & 2 input keys relate to the keys above the letters on the keyboard - not a numeric keypad

Tips for Building yourself

You will need Python 2.6 or earlier for pyinstaller. You will also need to install some extra libraries - notably PyHook, PyWin32 and PyQt

python Configure.py
python Makespec.py --onefile path_to_your_morsecodegui.py 
python Build.py path_to_the_Morsecodegui.spec

Getting Involved

In order to start contributing code to the project, follow the steps below:

  1. Fork this repo. For detailed instructions visit http://help.github.com/fork-a-repo/
  2. Hack away! but please make sure you follow [this branching model] (http://nvie.com/posts/a-successful-git-branching-model/). That means, make your pull requests against the develop branch, not the master branch.

Research

For further research and reading material on the use of Morse in assistive technology see http://www.citeulike.org/user/willwade/tag/morse as a starting point

Credits

Please contact me if you intend to fork this or do anything fun with it - will AT e-wade.net

Enjoy!

MorseWriter Key Codes

A
•—

B
—•••

C
—•—•

D
—••

E


F
••—•

G
——•

H
••••

I
••

J
•———

K
—•—

L
•—••

M
——

N
—•

O
———

P
•——•

Q
——•—

R
•—•

S
•••

T
            —

U
••—

V
•••—

W
•——

X
—••—

Y
—•——

Z
——••

1
•————

2
••———

3
•••——

4
••••—

5
•••••

6
—••••

7
——•••

8
———••

9
————•

0
—————

   .
•—•—•—

,
——••——


••——••

!
•—••——

:
—•—•—•

;
•••—•

@
   •———•

#
     —•———

$
—•••—•

%
•——•—•

&
—••——


•—•••

+
•——••


———•

=
•——•—

/
——••—

 \
—•••••

'
•—•——•

"
——•——

(
•••——•

)
—••——•

<
•—•••—

 >
——••—•

^
—•—••—

Enter
•—•—

Space
 
••——

Back
Space
————

Tab
—•——•

Tab
Left
——•—••

Uderscore

••——•

Page
Up
———••—

Page
Dwn
———•—•

Left
Arrow
————•—

Right
Arrow
—————•

Up
Arrow
————••

Down
Arrow
——————

Escape
••—••

Home
••••—•

End
—•—••

Insert
•—••—

Delete
—••—•

Start
Menu
——••••
Modifier Keys

Shift
••—•—

Alt
•—•——

Ctrl
—•—•—

Windows
••—•——

Application
Key
—•••——
Command Keys

Caps Lock
••—•—•

Repeat Mode*
•—••—•
Function Keys
F1 — F10
dot + number (F1 = ••————)
F11 & F12
dash + number (F11 =—•————)

*NB: To type Control+V you need to first go into repeat mode, then type Control and then type V. To release the CTRL, press repeat again

License

MorseWriter is licensed under the MIT License:

Copyright (c) 2012 Will Wade (http://sourceymonkey.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.