microsoft / vscode

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

Terminal > Integrated: Allow Chords setting does not work #142444

Closed lilyball closed 2 years ago

lilyball commented 2 years ago

Issue Type: Bug

At some point in the past year K in my Terminal stopped invoking the Terminal: Clear action and instead just waiting for a chord keybinding. I ended up working around this by defining K K as a chord that invokes Terminal: Clear as well, but this keeps tripping me up.

Today I looked into this again, and found the "Terminal > Integrated: Allow Chords" setting, but it looks like I already disabled that! It's set to false in my user settings (and is not modified in my workspace settings). And yet K still triggers chords.

As far as I understand, this setting is supposed to do exactly what I want. With it disabled, keyboard input in the terminal should never trigger chords. So I don't know what's going wrong.

VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z) OS version: Darwin x64 21.2.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|3, 2, 2| |Memory (System)|64.00GB (9.42GB free)| |Process Argv|crates/tracing-slog/ --crash-reporter-id 9e084c31-c5e0-4ce9-9608-5534964bf050| |Screen Reader|no| |VM|0%|
Extensions (56) Extension|Author (truncated)|Version ---|---|--- vscode-sievehighlight|adz|1.0.6 vscode-icalendar|af4|1.0.1 Bookmarks|ale|13.2.2 project-manager|ale|12.4.0 ascii-tree-generator|apr|1.2.4 troff|ban|1.0.22 vagrant|bbe|0.5.0 vscode-fish|bma|1.0.27 vscode-direnv|cab|1.0.0 vscode-modelines|chr|2.0.5 bracket-select|chu|2.0.2 doxdocgen|csc|1.3.2 viml|dun|0.1.7 gitlens|eam|11.7.0 EditorConfig|Edi|0.16.4 vscode-todo-plus|fab|4.18.4 lex-flex-yacc-bison|fau|0.0.3 macros|ged|1.2.1 vscode-pull-request-github|Git|0.34.3 vscode-graphql|Gra|0.3.41 fn-touchbar|Hap|1.0.0 beautify|Hoo|1.5.0 jenkinsfile-support|ivo|1.1.0 better-cpp-syntax|jef|1.15.11 nix-ide|jno|0.1.19 language-haskell|jus|3.4.0 swift|Kas|0.2.0 nim|kos|0.6.6 colonize|lil|0.0.1 autoconf|mae|0.1.0 gluon|Mar|0.3.0 rust-analyzer|mat|0.2.867 vscode-elixir|mjm|1.1.0 remote-containers|ms-|0.209.6 remote-ssh|ms-|0.70.0 remote-ssh-edit|ms-|0.70.0 remote-wsl|ms-|0.63.13 cmake-tools|ms-|1.9.2 cpptools|ms-|1.7.1 cpptools-extension-pack|ms-|1.1.0 vscode-ios-common-files|Ort|1.0.5 synthwave-vscode|Rob|0.1.11 llvm|RRe|0.1.1 perl6-lsp|scr|0.3.0 just|ske|2.0.0 tcl|sle|0.2.0 ascii-plist|spe|1.0.3 rewrap|stk|1.16.1 even-better-toml|tam|0.14.2 shellcheck|tim|0.18.6 jest-snapshot-language-support|tle|1.1.1 cmake|twx|0.0.17 vscode-terminal-here|Tyr|0.2.4 tmlanguage|Tog|0.9.1 FilterText|yhi|0.0.15 vscode-proto3|zxh|0.5.5 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyl392cf:30425750 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30429732 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30428979 pythonvs932:30410667 wslgetstartedc:30426334 vscop804:30404766 vscop341:30404997 vsrem710:30416614 vsbas813:30426126 ```
meganrogge commented 2 years ago

command K clears the terminal for me.

a few thoughts:

lilyball commented 2 years ago

This isn't a question about using VSCode. It's a bug. VSCode is configured to not allow chords in the integrated terminal, and yet it is doing so anyway.

Here's what I get from keyboard shortcuts troubleshooting:

[2022-02-13 16:43:37.556] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta
[2022-02-13 16:43:37.556] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta')
[2022-02-13 16:43:37.556] [renderer1] [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
[2022-02-13 16:43:37.632] [renderer1] [info] [KeybindingService]: | Resolving meta+[KeyK]
[2022-02-13 16:43:37.632] [renderer1] [info] [KeybindingService]: \ From 87 keybinding entries, matched chord, when: no when condition, source: user.
[2022-02-13 16:43:37.633] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [meta], code: KeyK, keyCode: 75, key: k
[2022-02-13 16:43:37.633] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: KeyK, keyCode: 41 ('K')
[2022-02-13 16:43:37.633] [renderer1] [info] [KeybindingService]: | Resolving meta+[KeyK]
[2022-02-13 16:43:37.633] [renderer1] [info] [KeybindingService]: \ From 87 keybinding entries, matched chord, when: no when condition, source: user.
[2022-02-13 16:43:38.321] [renderer1] [info] [KeybindingService]: + Storing single modifier for possible chord meta.
[2022-02-13 16:43:38.623] [renderer1] [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.

I don't know why it lists Resolving meta+[KeyK] twice, but the simple fact is I have the integrated terminal focused and yet it's still going into the chord mode.

And when I try extension bisect, it still occurs with all extensions disabled. So it's not an extension.

jbrowning commented 2 years ago

Same problem here. This is a bug report not a question.

Please reopen.