A simple way to style keyboard shortcuts in your documentation.
This package was inspired by auth0/kbd and dogezen/badgery. Also thanks to tweh/menukeys -- A LaTeX package for menu keys generation.
Document generating using jneug/typst-mantys.
Send them respect and love.
Please see the keyle.pdf for more documentation.
keyle
is imported using:
#import "@preview/keyle:0.2.0"
#let kbd = keyle.config()
#kbd("Ctrl", "Shift", "K", delim: "-")
#let kbd = keyle.config()
#kbd("Ctrl", "Shift", "K", compact: true)
#let kbd = keyle.config(theme: keyle.themes.standard)
#keyle.gen-examples(kbd)
#let kbd = keyle.config(theme: keyle.themes.deep-blue)
#keyle.gen-examples(kbd)
#let kbd = keyle.config(theme: keyle.themes.type-writer)
#keyle.gen-examples(kbd)
#let kbd = keyle.config(theme: keyle.themes.biolinum, delim: keyle.biolinum-key.delim_plus)
#keyle.gen-examples(kbd)
// https://www.radix-ui.com/themes/playground#kbd
#let radix_kdb(content) = box(
rect(
inset: (x: 0.5em),
outset: (y:0.05em),
stroke: rgb("#1c2024") + 0.3pt,
radius: 0.35em,
fill: rgb("#fcfcfd"),
text(fill: black, font: (
"Roboto",
"Helvetica Neue",
), content),
),
)
#let kbd = keyle.config(theme: radix_kdb)
#keyle.gen-examples(kbd)
MIT