Added detection of held keys.