A versatile and mobile keyboard and a highly energy efficient keyboard scanning
method are provided. The keyboard may be used with a variety of mobile devices
such as PDAs, cellular phones, and tablet PCs, through various interfaces such
as an IR, USB, or Bluetooth interface. In particular, an IR head assembly
is provided that includes an IR head, a movable arm on which the IR head is mounted,
and a connector for attaching to a docking structure. The docking structure may
be attached to a keypad, which is electrically coupled to the IR head for transmitting
keystroke data through the IR head. When a mobile device is docked on the docking
structure, the arm in the IR assembly may be moved to an optimal distance from
the IR port of the mobile device to ensure high communication performance between
the keyboard and the mobile device. An energy efficient keyboard scanning method
utilizes higher-valued pull-up resistors for energy conservation. The keyboard
scanning method includes a charging step to charge stray capacitance associated
with the keys. The keyboard scanning method can also be operated at a variable
scanning frequency.