add timeout to key listener