There are both optical and hall effect keyboards out there.
It's not really that useful though because most piano engines are sample based, (recording from different velocities of each key, then blend for intermediate values.
With non_sampled engines, Modeled Virtual instruments (vsts) like Pianoteq, they can write code to take advantage of additional tracking, but it won't make a huge difference as the piano is a percussive instrument.
Even with the optical kits that are available now, they really just translate velocity into a single midi value on output and let'r'rip.
Yamaha and kawai have a dual optical system on their acoustic action hybrid, but these are really unreliable, and acoustic actions are inherently unstable, bad choice for input into digital systems.
There is such a thing as an addon capacitative aftertouch kit, but this is mostly for synth use, not piano.
I don't recall any hall effect mass market keyboards.