In MS Teams, it is common to need to share code snippets quickly. Is there a keyboard shortcut that displays the code snippet editor?
2 Answers
Use 3 consecutive backticks ```
, on the latest MS Teams versions, seems we need a space after these backticks to make it work like ```
Examples:
```
```python
-
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.– Community BotCommented Mar 28, 2022 at 12:33
-
4Triple backticks creates a monospaced paragraph, not a code snippet as is asked in the question.– pooya13Commented Jan 26, 2023 at 1:32
-
2triple backticks followed by an optional language name and a space do create code snippets. Just tested it now ( 2023-09-13 )– gelonidaCommented Sep 13, 2023 at 14:08
-
-
can you change a setting somewhere so you don't need the add the space? it's really annoying and when I paste code from somewhere else it won't convert the ``` to a code snippet– RubenCommented Feb 13 at 11:36
NB! Following information is only to those people in the world, who use keyboard layouts with dead keys. If you don't have such, then don't read and rate this answer and move on.
I was struggling getting the monospace text box in Teams for years and I ended up in this topic and that's why I'm provising the information for similar people. When backtick is a dead key on your keyboard (Finnish/Swedish/Estonian for example), then you need three backticks (shift+tick - tick is between question mark and backspace key) followed by TWO spaces (the big key in the middle of lower row between Alt and AltGr keys). So you basically need 5 keypresses:
- Shift + ´`
- Shift + ´`
- Shift + ´`
- Spacebar
- Spacebar
-
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.– Community BotCommented Mar 7 at 13:34