Improve shortcut formatting in docs #36960
Merged
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.
Followup to godotengine/godot-docs#3257.
Added a new
[kbd]
tag for docs, similar to<kbd>
tag here on GitHub. It translates into:kbd:``
when generating RST-files. For built-in docs a style similar to[code]
was chosen, but the font is one point smaller and has a different color. I think, if #35608 is merged, the[kbd]
tag should be then made more visible with a darker background color.Here is the worst example for built-in help:
I've decided not to add this tag in some cases, like the
KEY_
constants in@GlobalScope
. I don't think that it would help readability there and some of the key names are very descriptive or specific. Can be easily corrected though, now that we have a tag.If I'm understanding the purpose of the
modules/mono/editor/bindings_generator.cpp
file correctly, this new tag is also excluded from XML docs in C# API bindings as unsupported.