-16

There should be a kbd button in the text editor, so users don't have to manually write <kbd>CTRL</kbd> ( CTRL ) all the time.

There would be much more people using it. I almost never use these tags because most of the times I am to lazy for it or have no time, the button would help a lot!

Kevin B. said "can see people abusing it for things that aren't keyboard buttons."

In this case the Stack Overflow developers should program it so that it only renders anything which is allowed. E.g. if someone writes foo then it should just not get rendered.

If the user submits then the whole text should be checked for any unallowed inputs server side, if there are some unallowed inputs then remove them and send the new text back to the client without posting it.

I also suggest virtual keyboards, where users are limited to the inputs of that keyboard, at this way they could also post a windows symbol.

22
  • 2
    i dunno if more people using it would be a good thing
    – Kevin B
    Dec 1, 2017 at 16:49
  • @KevinB Why do you think that keyboard buttons are a bad idea?
    – Black
    Dec 1, 2017 at 16:49
  • @ProEvilz true story, I never had one single upvote in meta afaik, only downvotes.
    – Black
    Dec 1, 2017 at 16:50
  • 4
    @ProEvilz Voting is different on meta. On posts tagged feature-request, voting indicates agreement or disagreement with the proposed change rather than just the quality or usefulness of the post itself.
    – FirstOne
    Dec 1, 2017 at 16:51
  • 5
    I don't think keyboard buttons are a bad idea. I just don't see them being useful in the majority of posts, and can see people abusing it for things that aren't keyboard buttons.
    – Kevin B
    Dec 1, 2017 at 16:51
  • 1
    @FirstOne Yes they are... hover over a downvote button for the tooltip and you will see. - This question does not show any research effort; it is unclear or not useful
    – ProEvilz
    Dec 1, 2017 at 16:52
  • 1
    @ProEvilz I'm not respoding to this. Check my edited comment. I'm not the one saying it! Edit: "Yes they are" is to my original comment "votes are not the same in meta"
    – FirstOne
    Dec 1, 2017 at 16:53
  • 1
    @ProEvilz It's absolutely usual, especially with feature-requests,
    – user0042
    Dec 1, 2017 at 16:55
  • @KevinB, then they could make a virtual keyboard instead, and if you press a key, then you should get the key as output.
    – Black
    Dec 1, 2017 at 16:57
  • 4
    ... wat... i don't even...
    – Kevin B
    Dec 1, 2017 at 16:58
  • @KevinB, you don't even?
    – Black
    Dec 1, 2017 at 16:59
  • 4
    The point @KevinB is trying to make, is that the amount of work necessary to build such a feature is way too much compared to the benefit it could provide.
    – user247702
    Dec 1, 2017 at 17:13
  • 1
    Checking serverside would only work on submit, it would make the preview and end result differ. What keyboard formats need to be supported? phone virtual keyboards too? they have emoji buttons. All this for a feature that rarely even has a use here.
    – Kevin B
    Dec 1, 2017 at 17:16
  • 4
    People are already abusing code formatting way too much, I'm not sure I want them to abuse <kbd> too. About your suggestion for not rendering anything that doesn't have anything to do with the keyboard, I'm not sure that will work out because as far as I know, there is no unicode character for the Windows logo, so for the Windows key, you would have to do something like <kbd>![](example.com/windowslogo.png)</kbd> (you could always write <kbd>Windows</kbd>, but an image looks a lot nicer). And there is no way to check automatically if the image is a Windows logo or something unallowed. Dec 1, 2017 at 17:19
  • 2
    So much hate and oppression in this thread. People manage to ask millions of awful questions abusing the 24 letters of the alphabet, ever thought about that huh????????
    – Pekka
    Dec 2, 2017 at 20:13

2 Answers 2

17

This is pretty much why we don't advertise that too much, and why we can't have nice things for the most part.

Just keep scrolling. If you find a sudden urge to build your own castle, there's always the sandbox.

5
  • Then it should be scripted so that it does only render allowed inputs, and everything else should not be rendered. Problem solved.
    – Black
    Dec 1, 2017 at 17:05
  • If the user submits then the whole text should be checked for any unallowed inputs server side, if there are some unallowed inputs then remove them and send the new text back to the client, with a message informing him what he did wrong.
    – Black
    Dec 1, 2017 at 17:09
  • 6
    @Black I see very few posts where using the <kbd> would make a question more clear and easier to read. Most programming problems don't involve indicating which keys you are pressing. On other sites (like Super User, or any of the LINUX sites) it might make more sense, but not on SO. Is there a practical use case I'm not thinking of? Dec 1, 2017 at 17:30
  • 1
    @psubsee2003 mostly editor related things. Search "ctrl" on SO for some examples, there's 80k plus of them
    – Kevin B
    Dec 1, 2017 at 17:41
  • @psubsee2003 vim tag might be an exception, but <kbd> is very useful there (and obviously vi.SE), given that most answers would look like gibberish to newbies.
    – Amadan
    Oct 29, 2018 at 10:46
17

Because.

6
  • I already solved this problem theoretically. Read my comments and question again... It wouldn't be hard to solve this problem.
    – Black
    Dec 2, 2017 at 8:28
  • 3
    Indeed, but consider the following equation (0 problems (by not allowing it in the first place)) > (1 problem (by allowing it) - 1 solution (by building a feature making it less of a problem))
    – Pekka
    Dec 2, 2017 at 20:14
  • 1
    That said, <kbd> is totally rad and we should be able to use it everywhere, including in titles. Never going to happen though.
    – Pekka
    Dec 2, 2017 at 20:25
  • @Pekka웃, so in other words, the devs have not the capacity to develope this or are simply too lazy
    – Black
    Dec 3, 2017 at 9:03
  • 1
    @Black probably neither - but they have a lot more important things on their plate. Things with a lot more practical importance and relevance.
    – Pekka
    Dec 3, 2017 at 17:25
  • On mobile, this looks like a Mayan pyramid with a very strange sacrifice altar on top. Can't unsee. Dec 9, 2017 at 0:06

You must log in to answer this question.

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