morseytype

Crates.iomorseytype
lib.rsmorseytype
version0.1.2
created_at2025-08-11 10:28:33.876766+00
updated_at2025-08-11 11:48:52.254555+00
descriptionMorseyType is a terminal-based Morse code typing trainer designed to help you improve your Morse code proficiency through structured practice sessions. The application presents words from english vocabulary lists, challenges you to type them in Morse code, and provides real-time performance feedback.
homepage
repositoryhttps://github.com/piter231/morseytype.git
max_upload_size
id1789885
size51,516
(piter231)

documentation

README

MorseyType - Morse Code Typing Trainer

MorseyType is a terminal-based Morse code typing trainer designed to help you improve your Morse code proficiency through structured practice sessions. The application presents words from english vocabulary lists, challenges you to type them in Morse code, and provides real-time performance feedback.

Features

  • ⏱ Real-time performance tracking with WPM (Words Per Minute) calculation
  • 🌍 Support for english language
  • 📊 Dynamic Morse code reference table for quick lookup
  • ⚙️ Adjustable threshold for dot/dash distinction
  • 📈 Real-time feedback on your Morse input and decoding

Run

in order to run it, just run

# cargo is just package manager for rust
cargo install morseytype
morseytype
#and begin to press spaces in specific duration.

remember that terminal needs to be at lease 26 cells height and 105 cells width

Dependencies

its dependency is x11, should be installed by default, otherwise just install libx11 using your os package manager.

Installation

  1. Clone the repository:
git clone https://github.com/piter231/morseytype.git
cd morseytype
  1. Build the application:
cargo build --release

Usage

Basic Command

cargo run -- [WORD_COUNT] [THRESHOLD_MS]

Examples

# 10 words, 150ms threshold
cargo run

# 5 words, 200ms threshold
cargo run -- 5 200

Parameters

Parameter Default Description
WORD_COUNT 10 Number of words to practice
THRESHOLD_MS 150 Duration threshold in milliseconds to distinguish dots (.) and dashes (-)

Key Bindings

Key Function
Space Press and release quickly for dot (.), hold longer for dash (-)
f Insert letter separator (/)
j Insert word separator (space)
; Backspace (remove last character)
q or Esc Exit program

Word List Credits

Special thanks to SMenigat for creating and maintaining the thousand-most-common-words repository, which provides the word lists used in this application. I converted the en.json from this repo into current dict.rs, in order to make it easy to use as one execuitable.

Technical Notes

  1. Input Handling: The application uses precise timing to distinguish between dots (.) and dashes (-). The default threshold is 150ms, but you can adjust this based on your typing speed and preference.

  2. Performance: The real-time WPM calculation is based on completed words. The final average WPM is calculated based on the total time taken to complete all words.

Development Journey

The main inspiration to make this project was watching the experienced morse operator on the video, and how quickly he does his job. Developing MorseyType was a challenging but rewarding experience. One of the most difficult aspects was implementing the precise timing mechanism for distinguishing between dots and dashes. After several iterations of trial and error with different timing approaches, I finally succeeded in creating a reliable system that:

  1. Accurately measures key press duration
  2. Provides consistent feedback
  3. Handles system interrupts gracefully
  4. Maintains performance across different platforms

The result is a responsive typing experience that faithfully translates your key presses into Morse code characters.

Contribution

Contributions are welcome! If you'd like to improve MorseyType, please follow these steps:

  1. Fork the repository
  2. Create a new branch for your feature (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 0

cargo fmt