A desktop application for encoding and decoding Morse code through an interactive GUI. Built with C# and Avalonia, this application supports French characters and provides a click-based interface to translate between text and Morse code.
- Morse Code Decoding: Translate Morse sequences back to text
- French Language Support: Complete support for French accented characters (À, É, È, Ê, Ï, Ô, Ü, Ù, Æ, Ç)
- Interactive GUI: User-friendly Avalonia-based desktop interface
- Real-time Click Interaction: Press and hold button to create Morse code sequences
- Comprehensive Character Set:
- All letters A-Z
- Numbers 0-9
- Punctuation marks and special characters
- Space and slash separators
- .NET 10.0 or later
- Windows, macOS, or Linux (Avalonia is cross-platform)
- Clone the repository:
git clone https://github.com/yourusername/MorseClickParser.git
cd MorseClickParser- Restore dependencies:
dotnet restore- Build the project:
dotnet build- Run the application:
dotnet run --project MorseClickTranslator/MorseClickTranslator.csproj-
Click Mode (Interactive):
- Press and hold the "Morse Button" for a dot (
.) - Press and hold for a longer duration for a dash (
-) - Release to register the input
- Use "Clear" button to reset
- Press and hold the "Morse Button" for a dot (
-
Timing Thresholds:
- Character Wait: 200ms (time before character completes)
- Translation Wait: 800ms (time to process Morse sequence)
- Space Wait: 2000ms (time to register word space)
MorseClickParser/
├── MorseClickTranslator/
│ ├── Morse.cs # Core Morse encoding/decoding logic
│ ├── MainWindow.axaml.cs # UI window with event handlers
│ ├── MainViewModel.cs # MVVM ViewModel for the application
│ ├── App.axaml.cs # Application entry point
│ ├── Program.cs # .NET entry point
│ ├── Languages/
│ │ └── FrenchDictionary.cs # Morse dictionary with French support
│ └── MorseClickTranslator.csproj # Project configuration
├── MorseClickTranslator.Tests/ # Unit tests (coming soon)
├── MorseClickTranslator.sln # Solution file
└── README.md # This file
The heart of the application containing:
Decode(string encodedText): Converts Morse code to textEncode(string rawString): Converts text to Morse code- Timing constants for click detection
Dictionary mapping characters to Morse code sequences:
- Basic Latin letters
- French accented characters
- Numerals 0-9
- Punctuation and special characters
MVVM ViewModel managing:
- Button press/release commands
- Morse code sequence tracking
- Timing and state management
Avalonia UI window handling:
- Button event bindings
- Pointer press/release interactions
- UI rendering
Run the test suite:
dotnet test| Letter | Code | Letter | Code |
|---|---|---|---|
| A | .- | N | -. |
| B | -... | O | --- |
| C | -.-. | P | .--. |
| D | -.. | Q | --.- |
| E | . | R | .-. |
| F | ..-. | S | ... |
| G | --. | T | - |
| H | .... | U | ..- |
| I | .. | V | ...- |
| J | .--- | W | .-- |
| K | -.- | X | -..- |
| L | .-.. | Y | -.-- |
| M | -- | Z | --.. |
Numbers: 1 (.----|) through 0 (-----) follow the pattern of increasing dashes.
French Characters:
- À, Â:
.--.- - É, Ë:
..-. - È:
.-..- - Ê:
-..- - Ç:
-.-. - And more...
- Language: C# (.NET 10.0)
- UI Framework: Avalonia 11.3.12
- MVVM Toolkit: Community Toolkit MVVM 8.4.2
MIT License
ImRadegast
Contributions are welcome! Please feel free to submit a Pull Request.
- The application uses click duration to distinguish between dots and dashes
- French language support is built-in and can be extended with additional languages
- The UI is responsive and works on multiple platforms thanks to Avalonia
- Morse code learning mode with a clicker-type Game
- Support for additional languages (German, Spanish, Italian, etc.)
- Audio output for Morse code (beeps and tones)
- Import/export Morse code to text files
- Customizable timing thresholds
Happy Morse learning! 📡