Future keyboards could use light to determine how far a key is pressed, a design that could replace the switches in a traditional mechanical keyboard with a system that takes up less space and potentially being capable of more presses than existing versions.