firefox compat: improve key recognition of Firefox