fix keydown directive under firefox, minor behavior fix