Patent ID: 7982716

Claim:
An optical switch comprising in combination: a plurality of key caps forming a keyboard pattern of a keyboard where each key cap is adjoined to a key stem and moves through a constraining surface; a plurality of detectors; a plurality of emitters, each of said plurality of emitters emitting an emitted beam to one of said plurality of detectors; each key stem having a lower surface which attenuates said emitted beam by moving said key stem downwardly; an electronic circuit configured to make a plurality of measurements of attenuation for each key stem in said keyboard pattern of keys based on output from said detectors, said electronic circuit in succession measures a present attenuation and then stores a value as a stored attenuation so that subsequent measures of said present attenuation can be compared with preceding values of said stored attenuation; said electronic circuit is configured to send key codes to a host; said electronic circuit is configured such that when said electronic circuit compares said stored attenuation to said present attenuation and they are substantially the same said key stem is in an up position and said electronic circuit uses said compare results only to determine said key stem position, and said compare result is withheld from sending any output to said host until said key codes are determined; said electronic circuit is configured such that when said electronic circuit compares said stored attenuation to said present attenuation and said stored attenuation is substantially different than said present attenuation said key stem is determined to be moving downwardly and said electronic circuit uses said compare result only to determine said key stem position, and said compare results is withheld from sending any output to said host until said key codes are determined; a first detection point is stored when said key stem is first detected to be moving downwardly; said electronic circuit is configured such that after said first detection point, when said electronic circuit subsequently measures said present attenuation and a comparison of said present attenuation and said stored attenuation is substantially the same, said key stem is determined to be in a down position and said electronic circuit uses said compare results only to determine said key stem position, and said compare results is withheld from sending any output to said host until said key codes are determined; said electronic circuit is configured such that when said key stem is detected to be in said down position said electronic circuit calculates a velocity of movement of said key stem from said first detection point to said down position and determines a key code representative of said key stem position in said pattern of keys; and whereas said electronic circuit transmits said key code and said velocity of said key stem to said host.