Couldn't you make the keys transparent and put the IR sensors below them?
My initial thoughts: 1) is there space underneath the key for such a sensor? 2) would the infrared light bounce off of the plastic on the key? 3) would transparent keys affect chicken-peckers (and other users) adversely?
Not saying it's not possible, although I imagine there will be challenges.