Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • $\begingroup$ An imperfect method: $$ $$ commands = {{"ctrl", "/"}}; $$ $$ TextGrid[commands, Frame -> All, Background -> {{LightGray, White}}] $$ $$ This doesn't have the beveled edges. I'll update if I can find something better. One thing I noticed that may be helpful though: if you copy the key combination box and paste into a notebook, it pastes as` Key1[ctrl,/]` with red text. If you hover over this it says The TemplateBox was unable to use the specified display function, or it was unable to locate the display function possibly because style sheet is missing $\endgroup$
    – ydd
    Commented Jul 4 at 5:18
  • $\begingroup$ Still unable to figure this out but I have been able to tease out the TemplateBox commands have to look like TemplateBox[{ctrl, return}, Key1, BaseStyle -> "HowToText" ...] (if you type this into google minus the ellipses and search verbatim you will see this is how it's written in the documentation). I don't know where this BaseStyle comes from and I don't really have any experience with boxes, but maybe someone will see this who can help. $\endgroup$
    – ydd
    Commented Jul 5 at 3:12
  • 1
    $\begingroup$ If you zoom in on the image in the question, you can see on the left of the frame that the gray background leaks out of the rounded frame. So I don't think it's worth trying to reproduce this janky help style exactly. What I usually do is simply use Pane["ctrl",FrameMargins->0] and similarly for the other key. $\endgroup$
    – Jens
    Commented Jul 5 at 4:47
  • $\begingroup$ Sorry, I had a typo: It's Panel, not Pane... Here's my corrected suggestion: Panel["ctrl", FrameMargins -> 0, BaselinePosition -> Baseline]. You can copy the output into your text. $\endgroup$
    – Jens
    Commented Jul 6 at 1:53