How kevinlionel874/ditdah works
DitDah is an assistive Morse keyboard spanning a web Studio, shared decoders, and prototype STM32 firmware. The main device workflow polls switch or breath inputs, decodes Morse, then emits keyboard actions with visual and tactile/audio feedback; the Studio offers browser Morse entry, speech, phrases, and word suggestions. Firmware orchestration and the Studio suggestion service are included as internal layers. Firmware relationships are based on shown calls and imports; Studio capability links rely on README statements where sampled wiring was unavailable.
Main entry points: app.c Device app · Composer.tsx Morse composer · route.ts Suggestion endpoint · suggest-core.ts Suggestion logic
Components 23
Studio
- Morse composer
studio/components/Composer.tsx - Key capture
studio/lib/use-morse-key.ts - Text editing
studio/lib/text-edit.ts - Phrase board
studio/lib/phrases.ts - Speech output
studio/lib/speech.ts - Suggestion endpoint
studio/app/api/suggest/route.ts - Suggestion logic
studio/lib/suggest-core.ts - Fallback words
studio/lib/fallback-words.ts - Settings
studio/lib/settings.ts - Rate limiting
studio/lib/rate-limit.ts
Morse decoding
- TypeScript decoder
decoder/src/morse-decoder.ts - Morse table
decoder/src/morse-table.ts - C decoder
decoder/c/morse_decoder.c
Device firmware
- Firmware entry
firmware/Core/Src/main.c - Device app
firmware/Core/Src/ditdah/app.c - Input polling
firmware/Core/Src/ditdah/inputs.c - Breath sensing
firmware/Core/Src/ditdah/breath.c - OLED display
firmware/Core/Src/ditdah/display.c - User feedback
firmware/Core/Src/ditdah/feedback.c
USB keyboard
- Keyboard reports
firmware/Core/Src/ditdah/keyboard.c
Other components
- Switch user
- Browser user
- Computer apps
Connections 19
- Browser user → Morse composer: enters Morse
README.md - Morse composer → Speech output: speaks text
README.md - Morse composer → Phrase board: selects phrase
README.md - Morse composer → Suggestion endpoint: requests words
README.md - Suggestion endpoint → Suggestion logic: delegates
studio/lib/suggest-core.ts - Suggestion logic → Fallback words: uses fallback
studio/lib/suggest-core.ts - Suggestion endpoint → Rate limiting: rate limits
- Morse composer → Text editing: edits text
- Morse composer → Key capture: captures keys
- Switch user → Input polling: operates switches
README.md - Firmware entry → Device app: starts app
firmware/Core/Src/main.c - Device app → Input polling: polls inputs
firmware/Core/Src/ditdah/app.c - Device app → Breath sensing: initializes sensing
firmware/Core/Src/ditdah/app.c - Device app → C decoder: decodes events
firmware/Core/Src/ditdah/app.c - C decoder → Morse table: looks up codes
- Device app → Keyboard reports: sends keystrokes
firmware/Core/Src/ditdah/app.c - Device app → OLED display: updates display
firmware/Core/Src/ditdah/app.c - Device app → User feedback: signals presses
firmware/Core/Src/ditdah/app.c - Keyboard reports → Computer apps: types into
README.md