You do understand that piano keys in an acoustic piano are "weighted" to make each one feel the same when pressed? And some digital pianos do the same thing. But with a digital one you need switches with little or no bounce in the switch. Bounce in a switch is when the switching parts make and break contact before settling into the on or off state. If doing this for a DIY project I'd probably start off with taking a computer keyboard apart, and seeing if those switches/contacts could be repurposed for the piano keys. Or at least that would show how it is done in those to prevent contact bounce.
First, the most common computer keyboards use mechanical switches. These all produce switch bounce which is debounced with on-board hardware. In the keyboards I had disassembled, this hardware is usually custom and proprietary.
Second, for this application the TS needs more than a key press. Acceleration and pressure are also needed. I also strongly suggest reading the above linked article.