solve key event bug in Firefox

Signed-off-by: Karel Kellner <karel@kellner.be>