-8

I have just written this comment, but while doing that I encountered a problem:
I wanted to tell the author to use the keyboard combination ALT+0223, but apparently this seems not to be possible in comments, so I've written it as a piece of code: ALT+0223 (not using the <kbd> tag, as this seems not to be covered in comments).

Is it foreseen to handle keyboard shortcuts, using the <kbd> tag in comments?

(For your information: I've searched for "kbd" in this meta-site and I'm surprise nobody seems having asked this question before.)

Answer on the first comment: I prefer ALT+0223 above ALT0223.

7
  • 17
    On an unrelated note, the usage of the <kbd> formatting that you show in the question is incorrect. It's meant to be applied to a physical key. No one has an "ALT+0223" key on their keyboard. Instead, they have separate "Alt", "+", "0", "2", and "3" keys. As such, it does not really make sense to format that using keyboard formatting.
    – Cody Gray Mod
    Mar 14 at 9:40
  • 1
    @CodyGray: I know it's agains the "rule" that <kbd> must reflect a single keystroke, but I prefer putting all characters within one tag (if ever somebody actually presses the + sign, an extra comment can be given :-)
    – Dominique
    Mar 14 at 9:48
  • 12
    It isn't a matter of preference, though; it's a matter of semantics. The <kbd> tag has a semantic meaning. Semantically, it means "the physical key on your keyboard labeled as shown here". There is no such key, however, which makes it semantically wrong to use that formatting. The usage you've shown is objectively incorrect, so even if you prefer how it looks, it is inappropriate to use it.
    – Cody Gray Mod
    Mar 14 at 9:48
  • 8
    This is just another case in the general category of "markdown/markup has semantic meaning, so you should not just use it to achieve a style effect you like". Taking another (regrettably common) example: code formatting is only for code. Semantically, it means this is code. It happens to be styled by adding a gray background to the element, but it does not mean "this is some highlighted text", and it should not be abused to achieve that stylistic effect.
    – Cody Gray Mod
    Mar 14 at 9:48
  • @CodyGray: I understand your point, and I'm not saying that <kbd> is source code, but if I write <kbd> without code formatting, there's nothing to see :-) (in case you don't see my second tag, please edit this comment). Oops, sorry, sometimes it does appear.
    – Dominique
    Mar 14 at 9:52
  • 5
    Related feature request on meta.stackexchange.com: Can I place <kbd></kbd> in a comment?.
    – Wai Ha Lee
    Mar 14 at 12:59
  • The typewriter era (that includes some primitive forum software used to this day) could deal with it. That is always an option, as a fallback. Mar 14 at 20:44

0

You must log in to answer this question.

Browse other questions tagged .