I like the <kbd> tag. It's a quick way to let people know that you want them to press a keyboard shortcut.

However, I find my self just using the ` shortcut to set key commands to monospace because it's so much easier to type than <kbd>cmd</kbd>+<kbd>opt</kbd>+<kbd>i</kbd>

Would you guys like a toolbar button in the post editor for making wrapping something in a <kbd> tag? I sure would.
But even more, I'd like to be able to do it textually: [cmd]+[opt]+[i]. That'd save me a lot of time.

How about you guys?

  • 2
    Is it possible for me to add a bounty to this question? I'd like to raise it up for a new feature request. – bmike Feb 9 '12 at 18:51
  • Sadly, there are no bounties on MAD. – Daniel Apr 28 '12 at 7:42
  • I've made a related request. – CyberSkull May 19 '14 at 0:09

I'm a big proponent of this being added - especially after trying to use the site exclusively for a few days on the iPad.

Arguments against:

  • Another icon in the edit bar adds clutter or bumps something still widely used.
  • Those that don't like seeing might oppose tools that encourage use of the <kbd> tag.
  • The formatting of these disrupt paragraphs just like an image embed can.

Arguments for:

  • The iPad keyboard is way less efficient to get to < and / than a physical keyboard.
    • Keying S takes 12 presses on a real keyboard (i suppose 5 of those are shift "letters" but it is one action to make the letter not two taps like on the iPad)
    • Keying S takes 25 presses on an iOS keyboard (try it yourself right now... I bet you'll mess up the / and have to use a few more taps than the most efficient way about half the time you try this)
  • It makes discovery of and use of that tag easier for new users.
  • It makes the site look professional and matches Apple's style of documenting key presses. (See the following pages of the 2009 version of the style document: 41, 100-101 especially read pages 100 through 101 for the difference between order, using - vs +, and more)
  • It makes it easier non-native level english readers to understand in a flash that the answer calls for a specific key to be pressed.
  • AutoCorrect on iOS and now Mac OS X futzes with these non-dictionary tags making automation more important to avoid incorrect tags.

Here's where my opinion really gets aired - I realize and like that it's not a universally shared opinion :-)

I would like to be lazy and have the toolbar help me add key caps markup syntax easier to type.

< kbd > and < /kbd > could be added just like block quote and code sample.

Are there any stats on how often these tags get used on Ask Different? What percentage/count of users has ever used X tag might be interesting to compare. Also - what percentage/count of questions have used said tags.

Perhaps no-one is using < kbd > except for me?

I think the style guide is a bit harsh on how bad these are in practice - so I'll add an answer there in defense of how easily people new to mac can see option + command +P +R intuitively means you hold them all down together.

Specifically, the confusion over naming of keys is due to Apple changing their symbols over time, people remembering the old way, and the fact that keyboards are different around the world as well as on Windows / Mac.

The other confusion is the difference between the silkscreened mask on the keyboard doesn't match the menu shortcuts. For example, all macs now use and printed on the keyboard, but if you look in the Bookmarks menu of safari, you will see the characters drawn as ↑ and ↓

enter image description here

Blaming the key cap <kbd> format for these problems is a red herring - the confusion exists whether you spell out command or use ⌘, whether it's an up arrow or an up triangle. We as a community have to deal with that confusion either way. Why not automate the formatting so people can pay attention to the message - making answers here match what mac users have had in their language for describing key presses for years.

I am of a strong opinion that when used properly, these tags make the site look professional and better match the documentation that Apple provides. I would want to encourage people to know it's possible and make it easier to select a word like option and automate wrapping it.

Geting to the < > and / are tedious alone on iOS and autocorrect needs to be beat into submission which makes it even harder to get that edit done while mobile.

  • The Apple Publication Style Guide is a wonderful resource. Thanks for bringing it to my attention. I concur that we should generally follow its suggestions, but I still advocate respecting individual authors choices and not editing purely for style unless the message is unclear. – jaberg May 1 '12 at 13:09
  • Indeed - the style guide is sorely outdated for iOS and recent changes, but it's a good first step and worth considering when we try to figure out what works best here. I'm happier going against it when we all consider and select a better way. – bmike May 1 '12 at 13:13
  • It wasn't my intent to align myself with the Style Guide's dislike for <kbd> icons—of which I am also a fan and frequent user. I was targeting its suggestions for how to use them (as opposed to when), as well as guidelines for displaying Menu Paths, etc. – jaberg May 1 '12 at 13:20
  • The how to edit is clearly a different thread - shall I delete these comments and let you start that anew here on meta? It's worth discussing that item whether or not we get better tools for making <kbd>. I'd like to focus on that for this thread. – bmike May 1 '12 at 15:46
  • I’d argue that looking at how much <kbd> is already used on Ask Different would be a bit of a red herring, since some (a majority?) of users don’t know that it exists, so can’t use it. For example, I only learnt about it when I saw it used in a post, and decided to peek under the covers and see how it was done. – alexwlchan Jun 22 '13 at 19:58

I am very much in favor of creating a syntax like Command ⌘+ Option ⌥ + I as it would solve a number of problems. As an iPad user I'm also in favor of an iPad friendly tool bar button.

How has this request languished for so long?

  • With almost 15 votes to the question and 10 to my answer above - I'll see what the next step might be in adding this to something to get coded for the site. I don't have any real pull, but can knock on some doors :-) – bmike May 30 '12 at 21:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .