Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

Browser full screen keypress (F11) and other shortcut keys don't work #128

@adam4235

Description

@adam4235

I find that with an emscripten SDL2 website, pressing F11 to go into full screen doesn't work on either Firefox or Chrome. For example, I tried the sdl2_canvas_palette.c example included with emscripten. Some other keypresses that the browser would normally intercept, including Ctrl+O for opening a file and Ctrl+S for saving the webpage, also don't work, but some shortcuts do work, such as Ctrl+N for New Window.

Note that I'm talking about the browser's full screen functionality, not the Full Screen button that Emscripten puts on the webpage.

I can still use the browser's full screen functionality through its menu instead of through the shortcut key. However, then F11 doesn't work to get out of full screen.

It does work with a non-SDL2 Emscripten example, such as hello_world.c, which is what makes me think the problem is related to the porting of SDL2 to Emscripten.

Is this a bug, or is there some reason for these keys not doing anything? I wouldn't have thought it should be possible for a website to prevent a browser's shortcut keys from doing what they normally do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions