Skip to content

[rcore] Add SetScreenshotKey to allow users to override the default F12 keybinding#5563

Closed
JeffM2501 wants to merge 2 commits intoraysan5:masterfrom
JeffM2501:SetScreenshotKey
Closed

[rcore] Add SetScreenshotKey to allow users to override the default F12 keybinding#5563
JeffM2501 wants to merge 2 commits intoraysan5:masterfrom
JeffM2501:SetScreenshotKey

Conversation

@JeffM2501
Copy link
Contributor

Raylib has SetExitKey that allows the user to change the key used for closing the window (defualt escape)
but does not offer the same functionality to set the screenshot key (F12).
This PR adds SetScreenshotKey to let users set the key in the same way for consistency in the API.

@raysan5
Copy link
Owner

raysan5 commented Feb 15, 2026

@JeffM2501 Thanks but I have no plans to add a specific function for that. Exit key is critical for many projects so a function to allow disabling it is important to be available. Screenshot is just a convenience functionality I need for my students, users needing to bind it to another key can just disable it with available flag and use the following one-line code for a custom implementation:

if (IsKeyPressed(KEY_SPACE)) TakeScreenshot("screenshot_name.png");

@raysan5 raysan5 closed this Feb 15, 2026
@JeffM2501
Copy link
Contributor Author

It's more about disabling it without needing to add an entirely new config.h

@raysan5
Copy link
Owner

raysan5 commented Feb 15, 2026

It's more about disabling it without needing to add an entirely new config.h

I see, the config.h system redesign should allow it. Does F12 interfere with some keys needed on a specific use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants