microsoft / vscode

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

vscode reads AltGr key as cursor-left move through X11 connections #24783

Open snoetzel32 opened 7 years ago

snoetzel32 commented 7 years ago

Steps to Reproduce:

  1. install/start X server on Windows system (Xming, MobaXterm or VcXsrv)
  2. start code on Linux box (make sure your SSH client has X11 forwarding enbled), use AltGr to compose "{" or similar, cursor jumps left. Interesting to note that both the "{" character and the cursor-left move are produced. This has started with VScode 1.11. Same with code-insiders. Don't get me started.
  3. Tested on 4 different computers.
brotulix commented 7 years ago

Experienced the same (same config as OP except Win 7). You can see the cursor move left when clicking just AltGr. The problem stopped when I -- as the release notes for 1.11.1 suggests -- switched to "keyboard.dispatch": "keyCode".

meuter commented 7 years ago

I had the same issue. Adding "keyboard.dispatch":"keyCode" fixed it. Thanks @brotulix

chmike commented 7 years ago

After updating to 1.15.1 I had this problem. I didn't have it with prior versions since 1.12 I think. Setting the parameter as suggested by @brotulix fixed the problem.

serl commented 7 years ago

I had the same issue with version 1.16.1. The solution proposed works as expected!

eazrael commented 6 years ago

This solved this issue for me, Thanks :-)

sey commented 6 years ago

Adding "keyboard.dispatch":"keyCode" fixed the issue but creates an other one.
I can't use the ctrl+/ to comment a line of code anymore.

FlorianIragne commented 6 years ago

I had the same problem for a week, struggling with setkbdmap and others. Thanks for the info.

As for the ctrl + / shortcut, i had to remap it to ctrl + shift + / (azerty kbd) even if it worked before when mapped to ctrl + /

inversus commented 6 years ago

I had the same problem and changing it to keyCode fixed it for me.

yannickvidal commented 5 years ago

This also fixed the "/" key of the numpad acting like "page up" for me

flurin-conradin commented 5 years ago

same problem and solution here. I believe this only started after upgrading to 1.30.2. Prior version 1.28 or so.

sam-sla commented 5 years ago

This was driving me crazy, I thought it was the auto-completion of the braces, until I finally realized the cursor was moving as soon as I pressed AltGr. Thanks a bunch!

serhatates commented 5 years ago

https://github.com/Microsoft/vscode/wiki/Keybinding-Issues

miguelcanosantana commented 4 years ago

Thanks! Really useful.

rnovicky commented 4 years ago

"keyboard.dispatch":"keyCode" fixed both "/" on NumPad and "Alt Gr" issues. (v 1.45.0)

andreas5232 commented 4 years ago

Had the same issue with vscode and Remote Desktop from Windows 10 to an Ubuntu Desktop VM running vscode. Thanks to this setting the really annoying cursor jumps to the left when entering brackets are gone now. You are awesome guys! :)

viell-dev commented 3 years ago

Had this problem on Remote Desktop to my Linux Mint machine in vscode 1.55.2. keyCode fixed it.

Karreg commented 2 years ago

Unfortunately, it does not work with vscode in WSLg. Neither code nor keycode fixes the issue. In a terminal opened in vscode, the issue is the same. However, in a standard WSL2 terminal, the issue does not occur.

arnholm commented 2 years ago

Thanks for this solution, I had this exact problem with vscode in a Kubuntu 20.04 virtual machine. The setting has to be applied for "User", and then it solves the AltGr = "left move" problem that was driving me crazy.

bkstein commented 11 months ago

Thanks from my side, too. I had never found this by myself. Just for the records: here's the link to MS's documentation: https://code.visualstudio.com/updates/v1_11#_improved-keyboard-layout-support

LinqLover commented 5 months ago

Same issue when using Remmina to RDP from Ubuntu 20 to Ubuntu 22, Qwertz keyboard layout (and yes, also with all other extensions disabled). Confirm that "keyboard.dispatch": "keyCode" works but breaks Ctrl + / - and I fear further keyboard shortcuts could be affected as well ...

Further, I use settings sync but would like not to synchronize this particular setting. There seems not to be a way to define certain settings locally on a single device - or even better, only when a remote connection to the DE is detected? Would be really great if support for this could be improved!

hatelamers commented 3 months ago

I don't beleave it, this issue is 7 years old and yet no solution? It is absolute productivity stopper: after a while of blind typing you find a completely messed up source file and have to correct it keystroke by keystroke.

efedus commented 3 months ago

thanks a lot, because i didn't found the wiki link by myself yet. on a remote debian 12 + cinamon + xrdp connection with remmina, french keyboard was working fine with all kb layouts i tried, excepting in vscode 1.90.2. during rdp connection. No problem when using local console.