KeyMentor is an intelligent typing coach that learns from your typing patterns to identify weak areas and generates personalized exercises for improvement. Unlike traditional typing tutors that use pre-existing datasets, KeyMentor continuously adapts to your unique typing behavior.
- Records individual keypress timings and accuracy
- Tracks typing speed (WPM) and error patterns
- Monitors reaction times and finger movements
- Stores comprehensive session data in SQLite database
- Identifies weak characters, bigrams, and trigrams
- Analyzes common typing mistakes and patterns
- Maps finger weaknesses based on QWERTY layout
- Generates personalized typing profiles
- Character-focused drills for problematic letters
- Bigram/trigram practice for challenging combinations
- Progressive difficulty scaling based on improvement
- Mixed exercises targeting multiple weak areas
- 7-day progress reports with trends
- WPM and accuracy improvement tracking
- Session history and performance analytics
- Export capabilities for data analysis
- GUI Mode: Full-featured Tkinter interface with tabs
- CLI Mode: Command-line interface for quick practice
-
Clone the repository
git clone https://github.com/yourusername/keymentor.git cd keymentor -
Install dependencies
pip install -r requirements.txt
-
Run the application
# GUI Mode (default) python ui.py # CLI Mode python ui.py --cli
- Launch the application:
python ui.py - Navigate through the tabs:
- Dashboard: Overview of your typing stats
- Typing Practice: Real-time typing sessions
- Analysis: View your weak spots and patterns
- Exercises: Practice personalized drills
- Progress: Track your improvement over time
python ui.py --cliChoose from the menu:
- 1. Start Typing Practice: Type custom or sample text
- 2. View Progress: See your typing analysis
- 3. Generate Exercises: Get personalized practice drills
- 4. Export Data: Download your progress data
- 5. Exit: Close the application
KeyMentor/
├── tracker.py # Real-time typing data capture
├── analyzer.py # Weak spot analysis engine
├── exercise_generator.py # Personalized exercise creation
├── ui.py # GUI and CLI interfaces
├── README.md # This file
├── requirements.txt # Python dependencies
├── tests/ # Comprehensive test suite
│ ├── test_tracker.py
│ ├── test_analyzer.py
│ ├── test_exercise_generator.py
│ └── test_ui.py
└── typing_data.db # SQLite database (created automatically)
- Manages typing sessions and real-time data capture
- Records individual keypress events with timestamps
- Calculates WPM, accuracy, and session metrics
- Persists data to SQLite database
- Analyzes typing patterns to identify weak spots
- Processes character, bigram, and trigram statistics
- Maps finger weaknesses using QWERTY layout
- Generates comprehensive typing profiles
- Creates personalized practice exercises
- Targets specific weak areas (characters, combinations)
- Implements progressive difficulty scaling
- Generates mixed exercises for comprehensive practice
- Tkinter-based GUI with tabbed interface
- Command-line interface for quick access
- Real-time typing practice environment
- Progress visualization and reporting
@dataclass
class TypingEvent:
timestamp: float
key: str
expected_key: str
is_correct: bool
reaction_time: float
session_id: str@dataclass
class TypingSession:
session_id: str
start_time: float
end_time: float
total_keys: int
correct_keys: int
wpm: float
accuracy: float
text_content: str
mistakes: List[Tuple[str, str]]@dataclass
class WeakSpot:
pattern: str
error_rate: float
avg_reaction_time: float
frequency: int
difficulty_score: float
pattern_type: strThe project includes comprehensive test coverage with 87 tests across all modules:
# Run all tests
python -m pytest tests/ -v
# Run specific test modules
python -m pytest tests/test_tracker.py -v
python -m pytest tests/test_analyzer.py -v
python -m pytest tests/test_exercise_generator.py -v
python -m pytest tests/test_ui.py -v
# Run with coverage
python -m pytest tests/ --cov=. --cov-report=html- Unit Tests: Individual component functionality
- Integration Tests: Component interaction testing
- Database Tests: SQLite operations and data persistence
- UI Tests: GUI and CLI interface testing
- Edge Cases: Error handling and boundary conditions
| Column | Type | Description |
|---|---|---|
| session_id | TEXT PRIMARY KEY | Unique session identifier |
| start_time | REAL | Session start timestamp |
| end_time | REAL | Session end timestamp |
| total_keys | INTEGER | Total keypresses recorded |
| correct_keys | INTEGER | Correct keypresses |
| wpm | REAL | Words per minute |
| accuracy | REAL | Accuracy percentage |
| text_content | TEXT | Typed text content |
| Column | Type | Description |
|---|---|---|
| id | INTEGER PRIMARY KEY | Auto-incrementing ID |
| session_id | TEXT | Foreign key to sessions |
| timestamp | REAL | Event timestamp |
| key | TEXT | Actual key pressed |
| expected_key | TEXT | Expected key |
| is_correct | BOOLEAN | Whether key was correct |
| reaction_time | REAL | Time since last keypress |
KEYMENTOR_DB_PATH: Custom database file path (default:typing_data.db)KEYMENTOR_LOG_LEVEL: Logging level (default:INFO)
- Exercise Difficulty: Adjust minimum sample sizes in
analyzer.py - Finger Mapping: Modify QWERTY layout mapping in
analyzer.py - UI Themes: Customize Tkinter appearance in
ui.py - Database: Switch to PostgreSQL/MySQL by modifying connection logic
KeyMentor tracks and analyzes:
- WPM (Words Per Minute): Standard typing speed measurement
- Reaction Time: Time between consecutive keypresses
- Flow Rate: Consistency of typing rhythm
- Overall Accuracy: Percentage of correct keypresses
- Character Accuracy: Per-character error rates
- Pattern Accuracy: Bigram/trigram success rates
- Character Weak Spots: Problematic individual letters
- Bigram Weak Spots: Challenging two-letter combinations
- Trigram Weak Spots: Difficult three-letter patterns
- Finger Weaknesses: Error rates by finger position
- Exercises automatically scale based on improvement
- Difficulty multipliers: Easy (0.5x), Medium (1.0x), Hard (1.5x), Expert (2.0x)
- Dynamic adjustment based on recent performance
- Character Exercises: Focus on specific problematic letters
- Bigram Exercises: Practice challenging letter combinations
- Trigram Exercises: Master three-letter patterns
- Mixed Exercises: Comprehensive practice targeting multiple areas
- CSV export for external analysis
- JSON format for API integration
- Progress reports with trend analysis
- Session history with detailed metrics
- Multi-language Support: International keyboard layouts
- Advanced Analytics: Machine learning-based pattern recognition
- Gamification: Achievements, streaks, and leaderboards
- Cloud Sync: Cross-device progress synchronization
- API Integration: RESTful API for third-party applications
- Mobile App: React Native or Flutter implementation
- Performance Optimization: Caching and query optimization
- Real-time Collaboration: Multi-user typing competitions
- Advanced UI: Modern web interface with React/Vue.js
- Machine Learning: Predictive exercise recommendations
- Accessibility: Screen reader support and keyboard navigation
We welcome contributions! Please see our Contributing Guidelines for details.
# Clone and setup
git clone https://github.com/yourusername/keymentor.git
cd keymentor
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Run tests
python -m pytest tests/ -v
# Run linting
flake8 .
black .- Follow PEP 8 guidelines
- Use type hints throughout
- Write comprehensive docstrings
- Maintain test coverage above 90%
Happy Typing! 🚀
KeyMentor - Your Personal Typing Coach