Capacitive pen input sensors on screen edge
Capacitive sensing typically doesn't work well for distance measurement. You can buy "long range" capacitive sensors, they have an 80 mm range (3.14") barely enough to meet your specification. But their accuracy is 0.8 mm and they're 28 mm in diameter, so you can't really pack them along the edge to increase accuracy. All that at 50Hz. 

Inductive sensors are even worse. With a 60 mm range (2.36") and ±6 mm drift due to temperature alone. These run at 4Hz.

So, given your problem statement, this is not at all feasible. Any of the sensors I've linked here have probably already left what most people would call a "homemade solution" and even then they're not good enough.

You'd be much better off using one of these touch screen overlays and building a µC based interface. This one comes pretty close to the size you need.