DEV Community

Matsuzaki Yosuke
Matsuzaki Yosuke

Posted on

Rust vs RSI: How I calculated that I lift 500kg/day with my fingers

Hello devs!
I am a former Series B engineer who developed RSI (Repetitive Strain Injury).

To visualize the invisible manual labor of coding, I built a desktop widget using Rust and Tauri v2.

The Shocking Data

I did the math based on a standard mechanical switch actuation force (80g):

  • 1 Keystroke = 80g
  • 1 Day of Coding = ~500kg (1.7 Grand Pianos) 🎹

I realized I was lifting a car every week with just my fingers. No wonder my wrists hurt.

The Tech Stack: Why Polling over Hooks?

This was the most interesting technical decision.
Most key-loggers use OS hooks (like rdev). However, I chose a low-level polling strategy (checking key states every 50ms) for this tool.

Why?

  1. Stability: Hooks can crash the input chain if they bug out. Polling is isolated.
  2. Permission Hell: macOS requires intrusive "Input Monitoring" permissions for hooks. Polling bypasses some of this friction.
  3. Privacy: I only needed to know if a key is pressed to calculate the "weight", not which key was pressed.

It’s a tradeoff: I sacrificed nanosecond precision for rock-solid stability.

The Result

I implemented a "Health Bar" system that drains as you type, treating coding energy like HP in a video game.

If you are curious about the implementation or want to see your own "Daily Tonnage", I've put the tool up here.
The Burnout Meter (booby.dev)

(It's free and runs locally, no data is sent to the cloud)

Discussion

Have you ever dealt with RSI? I'd love to hear your thoughts.

Top comments (0)