Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 153 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Here is my question! A couple of times, I wrote some thing like :

"I'm using a foreach loop"

and someone comes and edits it to:

"I'm using a foreach loop"

I can see the code when I'm editing it but the thing is that on my keyboard (French) I lack this key on my keyboard and I don't see any button to add this sort of quote, how can I do it?

(I did it here with a copy/paste from one of the guys that edited one of my posts but it would be cool if I don't have to always go to my old question and copy/paste the character from him!)

share|improve this question
Is this your layout? If so, it looks like Alt Gr+7, possibly followed by a space should work. – hammar Dec 5 '11 at 14:32
up vote 15 down vote accepted

There is a keyboard shortcut for code markup:

Ctrl + K

When it is a short segment within a sentence it will add the back ticks ` around the selection. If the selection spans a few lines it will indent them 4 spaces.

An alternative is to type in the full Unicode escape:

Alt + 0096

Or simply use the full <code> tag, as @casperOne mentions:

share|improve this answer

While I prefer Oded's answer (it is the simplest, IMO), it should also be noted that in cases where you don't have a Ctrl key (on a mobile device, for example) or a ` and you can't find the code format button at the top of the editor (or it's not there, because again, you are on a mobile device) you can use the <code> HTML tag inline, like so:

share|improve this answer
Oh, can I +10 this? I post a bit from my mobile device, and I'm always forgetting about the <code/> tag so I can do inline code formatting. – Andrew Barber Dec 5 '11 at 14:37
@AndrewBarber: I wish you could too, but of course, I'm a bit biased in this situation. =) – casperOne Dec 5 '11 at 14:38
@AndrewBarber: I'll donate +1 to your cause, so you just need to find +8 now :P – Matt Dec 5 '11 at 15:38
@AndrewBarber: +9, I can't vote on my own post. =) – casperOne Dec 5 '11 at 15:40
@AndrewBarber if your mobile device is an iPhone, just hold down the apostrophe, the backtick appears on a pop-up menu. All you then have to worry about is the autocorrect removing the closing backtick for you... – jrturton Dec 5 '11 at 16:34
@jrturton I should have included my device type (Android) in my comment. +1 anyway, since an iOS user might find that very useful. – Andrew Barber Dec 5 '11 at 16:36
@AndrewBarber: Speaking of iOS, on my iPad the backtick character is a little hard to find on the virtual keyboard. Tap the .?123 key, then tap and hold the apostrophe key until a pop-up menu appears. Backtick is the rightmost character in that menu. – Keith Thompson Jan 17 '12 at 23:40

I'm surprised no one has mentioned the {} button right on the formatting line above the question/answer box. You know, the one that goes B I | [globe+->] [quotes] {}...

I just checked, and it doesn't actually show up on mobile devices... Can we get it there? It would be so useful.

share|improve this answer
I mentioned it, but in the context where you don't have it (as in the mobile interface). – casperOne Dec 5 '11 at 15:40
I missed that, perhaps you should add the {} somewhere. – Kevin Dec 5 '11 at 15:48
Did you one better, I linked to your post. – casperOne Dec 5 '11 at 16:34

You must log in to answer this question.

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