microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.52k stars 28.99k forks source link

can't type anymore `«` on a Japanese keyboard with american layout. #127417

Closed karlcow closed 3 years ago

karlcow commented 3 years ago

Does this issue occur when all extensions are disabled?: Yes

Version: 1.57.1
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:32.912Z (1 wk ago)
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin x64 20.5.0

Steps to Reproduce:

  1. on a macOS with a macbook with a Japanese keyboard.
  2. Choosing the american keyboard.
  3. Finder Menu, display the keyboard
  4. Open VSCode
  5. Open an empty text file
  6. Type Option + ] (see on the keyboard visualizer the characters. the key with ] should display «)

Expected: The character « is added to the text file in vscode

Actual: Nothing.

PS:

  1. Option + shift + ] correctly adds the character »
  2. Same thing is happening with Option + [ which should add the character but instead nothing is added.
  3. This reproduces with code --disable-extensions
  4. This started to happen recently, probably at the last update or n-2.
karlcow commented 3 years ago

Also the character is perfectly added in all other applications of macos.

karlcow commented 3 years ago

It seems to have been captured by "Show Next inline Suggestion"

Capture d’écran 2021-06-29 à 18 52 52
karlcow commented 3 years ago
Capture d’écran 2021-06-29 à 18 55 19
karlcow commented 3 years ago

ok this is a regression introduced by @hediet

https://github.com/microsoft/vscode/commit/098dfd56e3cbdf406d5207bd522e2604dfa3b0e6

hediet commented 3 years ago

Thanks for reporting, I'm sorry for having caused this bug!

It has already been fixed in the latest VS Code Insider build, which will be released as Stable in the next week. We would appreciate if you could verify that the bug is fixed in the Insider build!

As a workaround, you can redefine these particular shortcuts to trigger the type command:

{
    "key": "option+shift+oem_6",
    "command": "type",
    "args": { "text": "«" }
},
{
    "key": "option+shift+oem_4",
    "command": "type",
    "args": { "text": "»" }
}

@alexdima I thought this was only problematic when using monaco directly?

karlcow commented 3 years ago

Thanks a lot. Wonderful to know that it has been fixed.

karlcow commented 3 years ago

/verified