A mechanism for predicting whether user interface elements, such as
keyboard cues, would be helpful to a computer user and either displaying
or hiding the user interface elements based on that prediction is
disclosed. Briefly described, an identification is made whether the last
input device was a keyboard or a pointing device, such as a mouse. If the
last input device was a pointing device, the keyboard cues are hidden. If
the last input device was a keyboard, the keyboard cues are displayed. If
the input device changes after the keyboard cues have been initially
either hidden or displayed, a message so indicating is passed up the
window hierarchy. Upon receiving the message, the top-level window
responds by causing the display states of all the windows in the window
hierarchy to be updated to reflect the changed input device