[rcore] Add SetScreenshotKey to allow users to override the default F12 keybinding#5563
Closed
JeffM2501 wants to merge 2 commits intoraysan5:masterfrom
Closed
[rcore] Add SetScreenshotKey to allow users to override the default F12 keybinding#5563JeffM2501 wants to merge 2 commits intoraysan5:masterfrom
JeffM2501 wants to merge 2 commits intoraysan5:masterfrom
Conversation
…or screenshots. Parity with SetExitKey
Owner
|
@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"); |
Contributor
Author
|
It's more about disabling it without needing to add an entirely new config.h |
Owner
I see, the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.