microsoft / vscode

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

^Z is interpreted as ^W on UK-keyboard #129834

Closed signed-log closed 2 years ago

signed-log commented 3 years ago

Issue Type: Bug

VSCode messes up keyboard shortcuts and thinks like you're using French keyboard

X11 show the keybindings correctly : showkeys -a UK layout :

^W       23 0027 0x17 #Pressing ^W
^Z       26 0032 0x1a #Pressing ^Z

FR Layout :

^Z       26 0032 0x1a #Pressing ^Z
^W       23 0027 0x17 #Pressing ^W

But those keys are swapped, ^Z is interpreted as ^W and the contrary is true too.

Bug is still present in fresh install, same as stable

VS Code version: Code - Insiders 1.59.0-insider (9520f0a515e7e24802c92f885a0efb242fca3831, 2021-07-14T05:14:09.735Z) OS version: Linux x64 5.13.5-arch1-1 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx (8 x 3305)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|1, 1, 1| |Memory (System)|13.60GB (6.45GB free)| |Process Argv|--no-sandbox --unity-launch --crash-reporter-id 85d2ab4f-4767-4fdb-973b-06eeca04c0df| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|gnome| |XDG_CURRENT_DESKTOP|GNOME| |XDG_SESSION_DESKTOP|gnome| |XDG_SESSION_TYPE|x11|
Extensions (202) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|2.1.0 html-snippets|abu|0.2.1 vscode-nginx-conf|ahm|0.1.3 project-manager|ale|12.3.0 auto-add-brackets|ali|0.11.0 arepl|alm|2.0.3 slidev|ant|0.3.2 where-am-i|ant|0.1.4 asciidoctor-vscode|asc|2.8.9 code-gnu-global|aus|0.2.2 toggle-semicolon|awe|0.0.1 inf|bag|0.0.1 bat-snippets|bat|0.2.0 Nix|bbe|1.0.1 close-all|ben|1.0.2 vscode-log-viewer|ber|0.12.2 github-markdown-preview|bie|0.0.2 markdown-checkbox|bie|0.1.3 markdown-emoji|bie|0.1.0 markdown-mermaid|bie|1.10.0 markdown-preview-github-styles|bie|0.2.0 markdown-yaml-preamble|bie|0.0.4 print-it|bma|0.1.5 mermaid-markdown-syntax-highlighting|bpr|1.2.2 split-lines|bra|1.0.2 xml2json|bui|1.2.4 multi-cursor-case-preserve|Car|1.0.5 vscode-opennewinstance|chr|0.0.7 path-intellisense|chr|2.4.0 vscode-css-modules|cli|0.2.3 jsrefactor|cms|2.20.6 gitignore|cod|0.7.0 bracket-pair-colorizer-2|Coe|0.2.1 crystal-lang|cry|0.8.2 doxdocgen|csc|1.3.2 yaml-key-viewer|cyb|0.2.2 dakara-foldplus|dak|1.5.1 markdown-table-prettify|dar|3.4.0 vscode-markdownlint|Dav|0.42.1 vscode-quick-select|dba|0.2.9 vscode-faker|dee|1.5.0 vs-code-snippet-generator|dku|1.1.0 sync-env|don|1.0.6 python-preview|don|0.0.4 git-extension-pack|don|0.1.3 githistory|don|0.6.17 python-extension-pack|don|1.6.0 xml|Dot|2.5.1 vscode-gitignore-syntax|dun|0.1.2 gitlens|eam|11.6.0 vscode-html-css|ecm|1.10.2 replacequotes|eda|0.0.1 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.22 vscode-great-icons|emm|2.1.79 json-tools|eri|1.0.2 prettier-vscode|esb|8.1.0 font-switcher|eva|4.0.1 vscode-open-in-github|fab|1.3.0 pipenv-scripts|Fed|1.0.3 git-project-manager|fel|1.7.1 stringtosql|flp|0.0.1 auto-close-tag|for|0.5.11 auto-rename-tag|for|0.1.7 code-runner|for|0.11.5 docker-explorer|for|0.1.7 docker-extension-pack|for|0.0.1 shell-format|fox|7.1.0 scs-script|Fra|0.0.2 duplicate|gee|1.0.1 chocolatey-vscode|gep|0.7.2 vscode-pull-request-github|Git|0.28.0 fast-snippet|giy|1.0.1 mdmath|goe|2.7.4 go-nightly|gol|2021.7.2819 json2ts|Gre|0.0.6 align-mode|Gru|0.0.21 editorenhancements|gur|1.0.1 vscode-systemd-support|han|0.1.1 gitignore-templates|has|1.0.1 vscode-drawio|hed|1.6.1 randomeverything|hel|0.0.3 docker-linter|hen|0.5.0 beautify|Hoo|1.5.0 rest-client|hum|0.24.5 output-colorizer|IBM|0.1.2 applescript|idl|0.21.0 mysql-syntax|jak|1.3.1 vscode-placeholder-images|Jak|0.1.0 RelativePath|jak|1.4.0 vscode-requirements|jan|0.1.0 search-node-modules|jas|1.3.0 better-cpp-syntax|jef|1.15.6 better-dockerfile-syntax|jef|1.0.2 vscode-todo-highlight|jgc|2.0.3 vscode-gnupg-tool|JHe|1.3.9 vscode-colorize|kam|0.11.1 vscode-gist|ken|3.0.3 vsc-python-indent|Kev|1.14.2 ligatures-limited|ksh|1.4.1 plusplus|ksm|1.1.1 rpm-spec|Lau|0.3.2 vscode-JS-CSS-HTML-formatter|lon|0.2.3 edge|luo|0.3.2 kconfig|luv|1.0.3 bash-ide-vscode|mad|1.11.0 autoconf|mae|0.1.0 MagicPython|mag|1.1.0 VS-code-vagrantfile|mar|0.0.7 vscode-simple-readme|mau|1.0.1 markdown-shortcuts|mdi|0.12.0 template-string-converter|meg|0.5.3 python-path|mge|0.0.11 git-graph|mhu|1.30.0 gitignore|mic|1.0.1 dotenv|mik|1.0.1 HTMLHint|mka|0.10.0 vscode-filesize|mkx|3.1.0 select-part-of-word|mle|1.0.1 vscode-html-format|moh|0.0.4 compare-folders|mos|0.22.2 vscode-docker|ms-|1.15.0 python|ms-|2021.8.1068685406-dev vscode-pylance|ms-|2021.7.8-pre.1 remote-containers|ms-|0.190.0 remote-ssh-edit|ms-|0.65.7 remote-ssh-edit-nightly|ms-|2021.7.29700 remote-ssh-nightly|ms-|2021.7.29701 remote-wsl|ms-|0.58.2 vscode-remote-extensionpack|ms-|0.21.0 cpptools|ms-|1.5.1 cpptools-extension-pack|ms-|1.0.0 hexeditor|ms-|1.8.2 sqltools|mtx|0.23.0 update-python-packages-and-requirements-txt|niz|1.1.3 autodocstring|njp|0.5.4 vscode-python-typehint|njq|1.4.1 incrementor|nms|1.0.3 printcode|nob|3.0.0 favorites|ole|1.5.2 vscode-html-scss|P-d|0.0.42 colorful-comments|Par|0.7.0 vscode-versionlens|pfl|1.0.9 vscode-gitignore-generator|pio|1.0.3 material-icon-theme|PKi|4.8.0 remove-comments|pli|1.2.2 polacode|pnp|0.3.4 quicktype|qui|12.0.46 sass-helper|ram|0.0.2 nginx-formatter|ray|0.0.13 ruby|reb|0.28.1 fabric8-analytics|red|0.3.3 vscode-commons|red|0.0.6 vscode-xml|red|0.17.0 vscode-yaml|red|0.22.0 base-development-extensions-pack|ric|2.2.0 snippets-ranger|rob|0.20.2 zsh-debug|rog|0.1.3 arduino-snippets|ron|1.0.2 color-manager|roy|0.6.2 partial-diff|ryu|1.4.3 copy-text|sal|0.4.9 bash-beautify|sha|0.1.1 trailing-spaces|sha|0.3.1 markdown-preview-enhanced|shd|0.5.22 html5-boilerplate|sid|1.1.1 svg-preview|Sim|2.8.3 vscode-fileutils|sle|3.4.5 vscode-zipexplorer|sle|0.3.1 comment-divider|sta|0.4.0 vscode-asciidoc|sta|0.0.3 ignore|Syl|0.0.4 open-in-browser|tec|2.0.0 vs-code-node-require|tgr|1.10.2 umlet|the|1.0.4 vscode-readme-pattern|tho|1.3.0 shellcheck|tim|0.14.4 pdf|tom|1.1.0 latex-support|tor|3.8.0 pypi-assistant|twi|1.0.4 sort-lines|Tyr|1.9.0 vscode-choosealicense|ult|0.4.0 errorlens|use|3.3.2 highlight-matching-tag|vin|0.10.1 colonize|vms|2.2.2 vscode-arduino|vsc|0.4.3 vscode-icons|vsc|11.5.0 vscode-nginx|wil|0.7.2 vscode-ruby|win|0.28.0 change-case|wma|1.0.0 vsc-jsonsnippets|wmo|0.9.4 vsc-meta-snippet|wmo|0.1.1 better-align|wwm|1.1.6 livecode|xir|1.3.10 txt-syntax|xsh|0.1.6 vscode-surround|yat|1.2.1 markdown-pdf|yza|1.4.4 markdown-all-in-one|yzh|3.4.0 json|Zai|2.0.2 commentbars|zfz|0.0.10 classnametocss|zit|0.0.5 vscode-open-in-github|ziy|1.3.6 (5 theme extensions excluded)
noppelmax commented 3 years ago

I'm having the issue with Ctrl+Z versus Ctrl+Y for german and english(us) keyboard layout.

VSC

Version: 1.58.2
Commit: c3f126316369cd610563c75b1b1725e0679adfb3
Date: 2021-07-14T22:30:16.440Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Linux x64 5.4.0-80-generic

And OS

(base) max@sam:~$ uname -a
Linux sam 5.4.0-80-generic #90~18.04.1-Ubuntu SMP Tue Jul 13 19:40:02 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
noppelmax commented 3 years ago

Even when typing in the editor it uses the correct (selected) keymap. Only for the shortcuts it is messed up.

fabienmoritz commented 3 years ago

Same issue here, but I have only one keyboard layout active (French, AZERTY).

Commit: 3866c3553be8b268c8a7f8c0482c0c0177aa8bfa
Date: 2021-08-19T11:54:37.513Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Linux x64 5.11.0-31-generic snap
alexdima commented 2 years ago

We have a few known issues on Linux when dealing with multiple keyboard layouts -- https://github.com/microsoft/vscode/wiki/Keybinding-Issues#troubleshoot-linux-keybindings

I think that one of the following applies: image

signed-log commented 2 years ago

Setting keyboard.dispatch to keycode works, thanks