SDL_GetKeyboardState(): Firefox vs Chrome

This may be nothing whatever to do with SDL, but when SDL_GetKeyboardState() is called in Emscripten it is giving different results depending on whether the browser is Firefox or Chrome (or other browsers based on the Chrome engine, e.g. Edge).

Specifically, SDL_SCANCODE_GRAVE and SDL_SCANCODE_APOSTROPHE are returning correct data in Firefox but not in Chrome (the ‘apostrophe’ key is responding as SDL_SCANCODE_GRAVE and the ‘grave’ key seems not to be detected at all) .

I am testing this with a UK layout keyboard, but I don’t know whether that is significant. I’ve put a little browser app here which you can use to test it with your own browser and keyboard.