xterm.js: altgr+num prints wrong character on French azerty keyboard

VS Code issue: https://github.com/microsoft/vscode/issues/82489

Using French (France) AZERTY keyboard

Expected:

  • 2: é
  • 7: è
  • altgr+2: (nothing)
  • altgr+7: (nothing)
  • altgr+2, space: ~
  • altgr+7, space: `

Actual:

  • 2: é
  • 7: è
  • altgr+2: é
  • altgr+7: è
  • altgr+2, space: é~
  • altgr+7, space: è`

This does not happen in monaco or other apps.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 12
  • Comments: 35 (17 by maintainers)

Most upvoted comments

I just tried on both vscode insider and xterm.js and I still have this issue.

If anyone wants to tackle this, plz see my last comment in PR #2976.

I’ve been able to reproduce this on all dead keys that require using the AltGr key, including on the BÉPO keymap, which is a French DVORAK keyboard. There is probably a missing return or break somewhere that would tell xterm.js to stop trying to identify the key if it’s a dead key. It should be noted that dead keys that do not use the AltGr key still work perfectly fine (both for AZERTY and BÉPO).

I’m unfamiliar with the TypeScript language but the exact cause may be found by debugging the Keyboard.ts file