Support inline <kbd> tag for displaying keyboard shortcuts #751
shoogle
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We would like to show keyboard shortcuts such as Ctrl+Z in our documentation.
Of course, it's already possible to show shortcuts in GitBook as plain text like Ctrl+Z, or as inline code like
Ctrl+Z
orCtrl
+Z
. However, these methods don't have the same appearance and accessibility advantages as a dedicated method.Instead, we would like to use HTML's dedicated
<kbd>
tag, which is supported in GitHub Markdown (try it in a comment below!).<kbd>Ctrl</kbd>+<kbd>Z</kbd>
Unfortunately, GitBook doesn't currently support the
<kbd>
tag even when it's manually added to Markdown files via GitHub Sync.Please add support for the
<kbd>
tag in GitBook, and apply the necessary CSS styling to make it look nice, like Ctrl+Z. This means a different font compared to plain text, a grey backgound, and shading so it looks like an actual keyboard key.Note: On GitHub, the
<kdb>
tag renders as Ctrl+Z, which is quite similar to its inline code rendering:Ctrl
+Z
.Edit: Actually, once published as a docs site, GitBook's rendering of
inline code
is acceptable for keyboard shortcuts. It's only the preview (that you see when editing a space) that looks bad for keyboard shortcuts.The published version looks fine (but still not as good as a proper
<kbd>
tag).Beta Was this translation helpful? Give feedback.
All reactions