More keydown hacks (fixes #923)