Skip to content

[rcore][web] Add EmscriptenKeyboardCallback() to consume key events #4956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Moros1138
Copy link

There are times when we want to use keys that are otherwise used for browser functions.

F1 -> opens a help tab (in Chromium based browsers, see #4951)
F5 -> refresh the page

There are many more key/key combinations that trigger browser actions. This PR seeks prevent the default browser actions by consuming all keyboard events. This leaves us free to use any keyboard cominations as we would in any other environment.

This PR fixes issue #4951

@raysan5 raysan5 changed the title [rcore] [web] add EmscriptenKeyboardCallback to consume key events [rcore][web] Add EmscriptenKeyboardCallback() to consume key events May 29, 2025
@raysan5 raysan5 added the platform: Web Web platform label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Web Web platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants