I would’t really like a formatting button for comments; it would also be hard to draw the line there: Why just for code formatting? Why not for bold, italic? Instead I’m going to suggest a different solution for you:
Your own personal keyboard layout
If you are on Windows, you can use the Microsoft Keyboard Layout Creator (MKLC) to create your own custom keyboard layout.
Once you have installed MKLC, start it and choose “File / Load Existing Keyboard…”. A window appears with a list of all the built-in keyboard layouts. Choose the one you want to build upon, i.e. most likely your Italian keyboard layout. The layout should then appear on the displayed keyboard.
Next, you will have to find a key combination you want to use for the new character. On the left, you can choose different shift states to switch the keyboard layout. Usually, the “Alt+Gr” keyboard layout is rather empty, so you can use that shift state if you don t want to lose any character. Or you could overwrite a different key you never use.
Once you have decided where to place the character, just click on the key and enter the symbol in the opened window. Do this for every key you want to change.
Once you are done you can test the keyboard layout using “Project / Test Keyboard Layout…”. Once everything is alright, make sure to change the settings in “Project / Properties…”. You will need to set a unique name and description here; the description is what is being displayed later in Windows.
Next you will have to build the keyboard layout. Choose “Project / Build DLL and Setup Package”. This will create a installer package in your documents folder. Launch the
setup.exe to install your keyboard layout. After installing it, it’s a good idea to restart your computer. It might work without, but didn’t for me. Make sure you don’t accidentally install the keyboard layout multiple times. That happened to me and it was difficult removing the first one; if you want to adjust your keyboard layout, it’s better to uninstall first and then install the new one.
Anyway, once you have installed the keyboard layout (and rebooted) it should already be available in the keyboard/language selector of Windows (otherwise add it in the language controls). Switch to it, and enjoy your new keyboard layout with support for new symbols!
As for other operating systems, I’m just going to refer to these two questions:
Why a custom keyboard layout is superior
Let me give you some reasons, why I believe that a custom keyboard layout is far more superior than a button:
Markdown: These days, Markdown is easily the most used formatting markup language on the internet. Every other website uses it or one of its derivates. It even starts to appear on some desktop applications. Despite it not being a standardized language, it’s pretty much the standard for easily readable markup today. And as much as you might hate it, the backtick is a standard character for displaying inline code.
So even if you get StackExchange to add a button there, not every other website you might use in the future will do that. Yes, some editing forms may have a button for it (like here in the question/answer editor); but others simply won’t.
By having an actual key on the keyboard to produce the symbol, you just avoid any problems you might run into then. Instead of requiring everyone to add a button, you can just use your key.
Other uses: Even outside of Markdown, the backtick is used for quite a few things. It has a special meaning in some programming languages like Perl, Ruby, or PHP to execute shell commands. In Haskell it’s a character used to use functions as binary operators. In PowerShell it’s the escape character. Some SQL dialects use it to escape table and column names.
None of these things will offer you a button to enter the backtick, but will instead require you to type it on your keyboard.
Typing flow: I don’t know how you are typing, but when I’m typing, both of my hands are on the keyboard. Having to stop in between to move one hand to the mouse to click a button that inserts a character would be terrible. It disrupts the flow and I couldn’t just keep typing. Maintaining a flow without having to move your hands while typing is very important; that’s why some editors like vim allow you to move the cursor using the keys
hjkl so you don’t have to reposition your hands on the arrow keys first and the move back. It sounds ridiculous, but it makes a great difference.
Occasion: When you are modifying your keyboard layout, it’s the best occasion to do some further improvements for it. There are always these minor things that you might miss on your keyboards. For example I’m quite addicted with typography, and I want to use typographically correct symbols when writing. Most if not all keyboards do not come with proper apostrophes or quotation marks; so when I modified my keyboard layout, I changed it so that I can simply type those.
Easiest solution: In all honesty, changing your keyboard layout would be the easiest solution for everyone. It might require some effort for you to create and install the keyboard layout, but that will take at most 10 minutes of your time. It’s really simple to do it and once you have it, you don’t need to do it again forever. You can just keep on using the layout and use the keys where you placed them. There is no need for others to think of a good solution to include a button next to a textfield when there is actually no real room for it and when ~95% of the users will never need to use the button anyway.
And as you mentioned in a comment above: “Bart found a 3 years old question with same topic, good catch. Unfortunately nothing has been done”. So three years later, nothing has been done, and it’s rather unlikely that such a button will just appear right now. But having your own key on your keyboard will just instantly fix this.