MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
289 stars 513 forks source link

Inline blocks of code (snippets) no longer formattable via keyboard (Markdown backticks) with certain keyboard layouts #9126

Open vancromy opened 1 year ago

vancromy commented 1 year ago

According to MS teams documentation, inline code snippets can be written by enclosing the code with single backticks as is usually done in markdown. This is an example of that implementation.

Multiline code snippets do however still work as can be seen in the attached video below.

The keystrokes I pressed in the following video to try and write an inline code snippet was [backtick]my code[backtick][space]

In my current version of Teams this does not work (see: https://github.com/MicrosoftDocs/msteams-docs/assets/59556820/8b90f413-9adf-466d-9df6-b596bc2d7d4c).

Teams version: You have Microsoft Teams Version 1.6.00.17554. It was last updated on 31/07/2023. OS Info: macOS 13.4.1 (c) (22F770820d)

EDIT: It seems someone opened a FR for this around the same time I opened this issue. Feel free to upvote that one too: https://feedbackportal.microsoft.com/feedback/idea/965f520a-e40c-ee11-a81c-000d3a7a48db

vancromy commented 1 year ago

@Nivedipa-MSFT apologies for the late reply. I have gathered logs of me reproducing this issue multiple times. How can I share it with you? I can see in the logs there is a lot of information about authentication and account names etc... so I'd rather not upload them to this public issue. If you can provide me with a secure authenticated link, I will happily upload there.

Re your other question - I experience this issue both on the web and desktop clients and as has been previously noted, if I change to a keyboard layout without diacritical marks (e.g. US/GB) I can easily add inline code snippets so this issue is specifically related to keyboard layouts with diacritical marks and UNIX based systems. Please ensure your engineering team tries to reproduce it with that in mind. Many users around the world have reported this not working so you have your pick of which layout to test. I use the NO (Norwegian) keyboard layout.

Chealer commented 1 year ago

@vancromy as reported before this issue is not specific to UNIX or UNIX-like systems. This affects my own professional PC using Windows 10 when using the CAN/CSA Z243.200 standard layout. Some have reported this affecting the US and UK layouts. If this is true, unless I am missing something, a reproduction condition unfortunately remains to be identified.

vancromy commented 1 year ago

@vancromy as reported before this issue is not specific to UNIX or UNIX-like systems. This affects my own professional PC using Windows 10 when using the CAN/CSA Z243.200 standard layout. Some have reported this affecting the US and UK layouts. If this is true, unless I am missing something, a reproduction condition unfortunately remains to be identified.

Apologies, I did not catch that it was happening for you on a Windows OS. You can see my previous comment of where I tested this on a Windows VM with a NO keyboard and did not have any issues with either the inline/multiline code feature. I therefore assumed it applied to UNIX-based systems. I stand corrected. Is it happening to you all the time or only sometimes?

On all unix systems I have tested it happens all the time and changes when changing keyboard layout so there really should not be an issue in reproducing it. I'll wait to get a link from MSFT where I can provide my logs and hopefully that will point towards a way of reproducing it :)

fpoyer commented 1 year ago

Same problem here, using Teams PWA (on Chrome), Linux Ubuntu 22.04, french AZERTY keyboard layout. Code blocks using 3 backticks (and, as far as I can tell, all other styles) works fine BUT the inline code doesn't, 100% of the time.

Nivedipa-MSFT commented 1 year ago

@vancromy - Could you please share the logs with us at microsoftteamsdev@microsoft.com?

vancromy commented 1 year ago

@Nivedipa-MSFT I just sent off the email with my logs. It should contain me testing both inline and multiline code snippets with NO keyboard layout with the former not working and then switching to the GB keyboard layout and both features working.

Olivier-OH commented 1 year ago

Hi!

On MacOS Sonoma and MacOS Monterey before that, for the last 6 months, I've had the problem only in chats but never in channels.

I have a French AZERTY keyboard layout.

The tip provided by @arnauddohogne (inserting the backtick from the special character table) works, but not when I enter the char from my keyboard directly.

Maybe it could be a hint for investigation that the keyboard-typed backtick still works in channels?

mikkorantalainen commented 1 year ago

Just a guess but maybe this bug affects only user where the backtick (U+0060) is written using so called "dead keys" or "compose keys"? I'm using Finnish keyboard layout on Linux. Note that if your keyboard layout uses backtick via compose character, it may show up to JavaScript code as U+0300 or U+02CB.

In case of Finnish keyboard, I usually type the backtick alone as {shift + key next to backspace twice} so if Teams is expecting the backtick character to appear with less key events, the code may not handle that case correctly.

Olivier-OH commented 1 year ago

Just a guess but maybe this bug affects only user where the backtick (U+0060) is written using so called "dead keys" or "compose keys"? I'm using Finnish keyboard layout on Linux. Note that if your keyboard layout uses backtick via compose character, it may show up to JavaScript code as U+0300 or U+02CB.

I find this hunch very relevant! Yes, the backtick is actually a grave accent and is on a dead key that can be used to type À È or Ù for example. So to type a ` I hit the key then the space bar.

In channels, the problem does not exist, which would mean the code is not the same as in chats?

vancromy commented 1 year ago

Just a guess but maybe this bug affects only user where the backtick (U+0060) is written using so called "dead keys" or "compose keys"? I'm using Finnish keyboard layout on Linux. Note that if your keyboard layout uses backtick via compose character, it may show up to JavaScript code as U+0300 or U+02CB.

I find this hunch very relevant! Yes, the backtick is actually a grave accent and is on a dead key that can be used to type À È or Ù for example. So to type a ` I hit the key then the space bar.

In channels, the problem does not exist, which would mean the code is not the same as in chats?

@Olivier-OH what do you mean when you say it works in channels? Do you mean when writing a new message in a channel or commenting on a channel message? I encounter this issue both in channels and chat so I cannot confirm what you have observed.

I just tested again and can confirm it does work in channels with this keystroke sequence and my NO layout: [backtick] [space] text [backtick] [space] so there must evidently be different code between chats and channel messages

Chealer commented 1 year ago

Although my Teams install was affected on September 11, it appears OK now (1.6.00.24078). I am still using the same layout (CAN/CSA Z243.200) but snippets are now working, either in "chats" or posts. I can enter an inline x simply by:

  1. Holding AltGr
  2. Pressing the caret key (right of P)
  3. Releasing AltGr
  4. Pressing x
  5. Holding AltGr
  6. Pressing the caret key
  7. Releasing AltGr
  8. Pressing Space (for example)

@eglavin which version do you experience this with?

ChetanSharma-msft commented 1 year ago

Hello Everyone, We have escalated the issue, informed engineering team and shared the logs as well. We will let you know once we get any updates from engineering team.

devops-42 commented 1 year ago

Hi @ChetanSharma-msft, thanks for pushing this. Just for the records, the issue is also in the new Teams client (checked with version 23247.720.2421.8365, MacOS M1).

mateusfccp commented 1 year ago

I am also having this issue for while now, both in macOS 13.x and after upgrading to 14.0 (Sonoma).

Teams version: 1.6.00.26463. Macbook Pro 2019 16", 16GB version.

I also use Brazilian keyboard layout.

Nivedipa-MSFT commented 1 year ago

@vancromy - Engineering team is looking into this feature request and till then you can use workaround shared by engineering team.

Work around for now is:

  1. Use the formatting bar.
  2. Perform a backtick in without firing a composition event - i.e. US layout or some other keyboard shortcut.
canutoalex commented 1 year ago

Not sure I'd classify this as a "feature request", it's a straight up bug, but glad to hear the team is looking into it.

mateusfccp commented 1 year ago

Not sure I'd classify this as a "feature request", it's a straight up bug, but glad to hear the team is looking into it.

Not only a bug, but a regression. It should be easily solvable as it used to work, and it should also have been caught in automated tests.

vancromy commented 1 year ago

@vancromy - Engineering team is looking into this feature request and till then you can use workaround shared by engineering team.

Work around for now is:

  1. Use the formatting bar.

  2. Perform a backtick in without firing a composition event - i.e. US layout or some other keyboard shortcut.

@Nivedipa-MSFT could you please let me know where I can find the bactick on the formatting bar? I only see options related to formatting text instead of inserting symbols.

Olivier-OH commented 1 year ago

@Nivedipa-MSFT could you please let me know where I can find the bactick on the formatting bar? I only see options related to formatting text instead of inserting symbols.

There is a "preformatted" format in the format menu, next to "title 1, title 2, ..., body"

mateusfccp commented 1 year ago

@Nivedipa-MSFT could you please let me know where I can find the bactick on the formatting bar? I only see options related to formatting text instead of inserting symbols.

image

By selecting Monospaced you can format your text like we used to do with backticks.

yury-kozlov commented 1 year ago

another use-case of backtick not working:

vancromy commented 1 year ago

@yury-kozlov I would recommend opening a separate issue for this so as to not clutter this one. Your issue seems more specific to certain keystroke combinations whereas this issue is related to the functionality not working at all.

cyberw commented 1 year ago

Following this ticket with interest, because I have the same problem. If it is any help, I'm on a swedish keyboard, using Ventura and Teams Classic (1.6.00.27656). I think I've had it for a few months, and I've tried clearing cache etc.

Sidelobe commented 1 year ago

WORKAROUND: Following @mikkorantalainen's hunch, I've customized my keyboard layout with Ukulele and changed the U+0060 GRAVE ACCENT key to no longer be a "dead key" (i.e. wait for the entry of a vowel or other letter afterwards).

This means I can no longer use it when I type in French, BUT I can succesfully use the inline code feature again!

So it's definitely related to the "compose/dead key" mechanism, not just the ASCII character itself.

I'm on macos 13.4.1 and use a Swiss German keyboard layout.

Olivier-OH commented 1 year ago

WORKAROUND: Following @mikkorantalainen's hunch, I've customized my keyboard layout with Ukulele

great to see it's working. I think I'm going to create a layout where option+``` directly types the back quote and leave the key without modifier as is! (I use a French AZERTY keyboard)

kuhmuh commented 1 year ago

WORKAROUND: Following @mikkorantalainen's hunch, I've customized my keyboard layout with Ukulele and changed the U+0060 GRAVE ACCENT key to no longer be a "dead key" (i.e. wait for the entry of a vowel or other letter afterwards).

This is quite sick, but it worked. Thanks a lot! But this is a regression bug as stated above.

stidch commented 1 year ago

WORKAROUND: Following @mikkorantalainen's hunch, I've customized my keyboard layout with Ukulele

great to see it's working. I think I'm going to create a layout where option+``` directly types the back quote and leave the key without modifier as is! (I use a French AZERTY keyboard)

@Olivier-OH are you on a Mac? what tool are you using for that?

Olivier-OH commented 1 year ago

WORKAROUND: Following @mikkorantalainen's hunch, I've customized my keyboard layout with Ukulele

great to see it's working. I think I'm going to create a layout where option+``` directly types the back quote and leave the key without modifier as is! (I use a French AZERTY keyboard)

@Olivier-OH are you on a Mac? what tool are you using for that?

Yes I'm on Mac and I used Ukelele that I just installed with brew

stidch commented 1 year ago

WORKAROUND: Following @mikkorantalainen's hunch, I've customized my keyboard layout with Ukulele

great to see it's working. I think I'm going to create a layout where option+``` directly types the back quote and leave the key without modifier as is! (I use a French AZERTY keyboard)

@Olivier-OH are you on a Mac? what tool are you using for that?

Yes I'm on Mac and I used Ukelele that I just installed with brew

@Olivier-OH do you mind sharing the configuration steps within the tool? Unfortunately I don't find the tool very intuitive.

Olivier-OH commented 1 year ago

@Olivier-OH do you mind sharing the configuration steps within the tool? Unfortunately I don't find the tool very intuitive.

I made a quick video here https://www.youtube.com/watch?v=nY0_eKqnHJU to show the steps.

image

The tool used to be more intuitive a few years back. Now that it has more features, it's a bit less easy to use. But I could get the simple change that I needed.

firefly-liam commented 1 year ago

I'm using English keyboard layout on Windows. @mikkorantalainen's guess above regarding compose keys seems accurate. When I hit backtick (U+0060) once, nothing appears. When I hit it a second time, two backticks appear. In any other application, I just left arrow between the backticks and enter whatever text I want. Doing this on Desktop Teams though doesn't provide me with inline code.

Hitting backtick once, then typing my inline code, then a second backtick, does provide me with inline code. It's still a bit buggy though. If I enter a vowel as the first character in my inline code text, then that character gets the grave accent applied to it. As a workaround, I omit the initial vowel, type my inline text, then go back in and edit it.

sebastianfrey commented 1 year ago

Users with German keyboard layout on Ubuntu (22.04) can workaround the issue by switching to a German keyboard layout with no dead keys:

  1. Go to settings and search for Keyboard
  2. Navigate to Input Sources
  3. Click on +
  4. Click on
  5. Search for Germany, no dead keys
  6. Select the first entry which contains Germany, no dead keys and click Add. On my system the full name of the keyboard layout was Romanian (Germany, no dead keys).

When possible, select it as default keyboard layout, or if not, switch context dependent your input sources using Super + Space.

durd commented 1 year ago

Swedish keyboard on macOS Sonoma and new Teams, can confirm inline code does not work whatever I do. Neither in chat or channel. Hasn't worked for the last 6months either.

lgbraus commented 1 year ago

I am using macOS Sonoma - version 14.1.1 If I use US keyboard, it works fine, but US International doesn't work at all.

durd commented 1 year ago

I am using macOS Sonoma - version 14.1.1 If I use US keyboard, it works fine, but US International doesn't work at all.

I can confirm this behavior. US works, but not US International - PC nor Swedish.

devnix commented 1 year ago

Hate to be that +1 guy but...

kohm commented 1 year ago

This is still happening

OSX Ventura 13.6 (22G120)

Keyboard: Spanish

erikbrgn commented 1 year ago

Swedish keyboard on macOS Sonoma and new Teams, can confirm inline code does not work whatever I do. Neither in chat or channel. Hasn't worked for the last 6months either.

Yep, same here. At some point it worked once or twice again, but never to return.

triple backtick + space seem to work though.

negora commented 1 year ago

This problem also occurs with a Spanish keyboard (es layout). If I configure my system to use the en_US layout, the inline code works fine.

I'm using Debian GNU/Linux 12.2 (Bookworm) 64-bit with Chromium 119.0.6045.159. I've tried Teams directly as a web page and as a PWA (Progressive Web Application).

Wajeed-msft commented 1 year ago

Currently, we do not have any ETA to share when this issue will be fixed. We will keep you updated on our progress and any developments related to this matter as soon as we hear from the team. Meanwhile, please use the workaround suggested by engineering team that is to use UI toolbar:

image

mvillafuertem commented 1 year ago

This is still happening

You have Microsoft Teams Version 1.6.00.29954. It was last updated on 8/11/23.

OSX Ventura 13.6 (22G320)

Keyboard: Spanish

mikkorantalainen commented 12 months ago

On Linux the monospace works if you use e.g. layout Swedish (no dead keys) but not with any layout that has dead keys. Of course, without dead keys writing accented European letters such as ç, á, à, é or è is pretty hard, so this too should be considered as a workaround, not a fix.

bit2shift commented 11 months ago

On Linux the monospace works if you use e.g. layout Swedish (no dead keys) but not with any layout that has dead keys. Of course, without dead keys writing accented European letters such as ç, á, à, é or è is pretty hard, so this too should be considered as a workaround, not a fix.

Can confirm, it really is a regression on the handling of composing/dead grave keys. I'm using Teams (Classic) on Chrome on Linux. I have to constantly switch from Portuguese to English (UK) whenever I need inline code.

ohitz commented 11 months ago

To work around this stupid bug I'm using xmodmap to remap my (mostly unused) §-key to the backtick with the following line in ~/.xmodmaprc:

keycode 49 = quoteleft

In my .xsessionrc I have xmodmap ~/.xmodmaprc which does the remapping.

dadagama commented 11 months ago

Just to report that the Inline block of code using [backtick][text][backtick] is not working in the Microsoft Teams (work or school) Version 23320.3107.2575.3762 (23320.3107.2575.3762) MacOS Monterrey 12.3 (21E230)

the code block one [backtick][backtick][backtick] works fine though

dadagama commented 11 months ago

Just tested in different versions, same issue.. so probably is not a MS Teams thing but something in the OS? image

dadagama commented 11 months ago

indeed I switched from spanish keyboard to english keyboard config image

now backtick is on my > < keystroke, but:

image
nferro commented 11 months ago

Currently, we do not have any ETA to share when this issue will be fixed. We will keep you updated on our progress and any developments related to this matter as soon as we hear from the team. Meanwhile, please use the workaround suggested by engineering team that is to use UI toolbar:

At the very least, can we have a keyboard shortcut to apply Monospaced formatting? Or some alias to replace the backtick?

PolluxAndCastor commented 10 months ago

Hello, for anyone finding this and using an international keyboard (US Intl in my case) with the dead-keys effect (used for accent and stuff)...

I just found that using Option+Shift+[backtick] (or ALT+Shift+[backtick]) will produce a [backtick] directly without the dead-key effect, and thus works with the inline code formatting functionality. No need to remap to a different layout or install any additional software.

canutoalex commented 10 months ago

Hello, for anyone finding this and using an international keyboard (US Intl in my case) with the dead-keys effect (used for accent and stuff)...

I just found that using Option+Shift+[backtick] (or ALT+Shift+[backtick]) will produce a [backtick] directly without the dead-key effect, and thus works with the inline code formatting functionality. No need to remap to a different layout or install any additional software.

@PolluxAndCastor

  1. Love the name :)
  2. THANK YOU, this is the only workaround so far that is actually doable.

To the guys at Teams: note the use of the word "workaround" still.