An optical modulator is hung from a key moved on a key trajectory so as to
be moved together with the key, and a light beam, which is stationary
with respect to a key bed, is radiated through the optical modulator; a
large number of miniature refractors are formed on the light output
surface of the optical modulator, and the density of miniature refractors
per unit area is varied in a direction in which the optical modulator is
moved together with the key so that the current key position is converted
to the amount of light passing through the optical modulator; since the
miniature refractors and other portions of optical modulator have a
unitary structure, a molding process is used for the optical modulator,
and the molding process make the production cost low.