Rust vs RSI: How I calculated that I lift 500kg/day with my fingers
Source: Dev.to
Visualizing the Invisible Labor of Coding
I built a desktop widget with Rust and Tauri v2 to illustrate how much “weight” we lift with our fingers while coding.
The math
- Standard mechanical switch actuation force: 80 g per keystroke
- Approximate daily keystrokes → ~500 kg of force per day (about 1.7 grand pianos)
That means we’re effectively lifting a car every week with just our fingers—no wonder the wrists start to hurt.
Technical Decision
I considered using the rdev crate for low‑level input hooks, but opted for a polling strategy (checking key states every 50 ms) instead.
Why polling?
- Stability – Hooks can crash the input chain if they misbehave; polling runs in isolation.
- Permission Hell – macOS requires intrusive “Input Monitoring” permissions for hooks. Polling sidesteps much of that friction.
- Privacy – The widget only needs to know whether a key is pressed, not which key, to calculate the “weight”.
The trade‑off is sacrificing nanosecond‑level precision for rock‑solid stability.
Implementation Highlights
- A “Health Bar” drains as you type, treating coding energy like HP in a video game.
- The widget runs locally; no data is sent to the cloud.
Try It Yourself
You can download and run the tool here:
It’s free and runs entirely on your machine.
Discussion
Have you ever dealt with RSI from coding? I’d love to hear your thoughts and experiences.