Fix keydown in apps module (issue #4151)