vscode: Using key chord when file tree is focused triggers file highlighting

Issue Type: Bug

When focusing the file tree pane, hitting the “Save all” chord Ctrl+K-S triggers the file highlighting feature when the S key is pressed, making it impossible to use the chord.

VS Code version: Code 1.31.0 (7c66f58312b48ed8ca4e387ebd9ffe9605332caa, 2019-02-05T22:35:56.624Z) OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel® Core™ i7-4700HQ CPU @ 2.40GHz (8 x 2394)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 7.89GB (1.75GB free)
Process Argv
Screen Reader no
VM 50%
Extensions (3)
Extension Author (truncated) Version
tslint eg2 1.0.42
csharp ms- 1.17.1
vscode-docker Pet 0.5.2

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@joaomoreno That is crazy, I didn’t realize TS would find those to be compatible… Thanks for the heads up. I’ve pushed 2ff5d6bec9c0406cf49359a0a92d8a382609b8ef which makes it more obvious and found another bad usage 😕 https://github.com/Microsoft/vscode/commit/2ff5d6bec9c0406cf49359a0a92d8a382609b8ef#diff-2203e613237f08bd954dd0a758dfffb4R360

@alexandrudima Check out what I get with <kbd>Ctrl K</kbd>.

image

<kbd>Ctrl-F17</kbd>?! 🤔 Investigating…

@alexandrudima Found the issue. I was passing a raw KeyboardEvent to softDispatch which was resolving to that ctrl+F17 keypress. As soon as I wrapped it around StandardKeyboardEvent, I got the correct behavior:

image

I’ll close this with that fix… but you might want to look into it.

I’m able to reproduce this issue in latest Insiders build.

  1. Click on any file in Explorer
  2. Press Ctrl + K - status bar shows (Ctrl + K) was pressed waiting for second key of chord...
  3. Press any key - it is added to highlight, status bar still shows (Ctrl + K) was pressed waiting for second key of chord...

I have "workbench.list.keyboardNavigation": "highlight" in settings.

If I switch it to "simple" than I see next behavior:

  1. Press Ctrl + K - status bar shows (Ctrl + K) was pressed waiting for second key of chord...
  2. Press s - all edited files saved, status bar is cleared and file/folder starting with s is focused

VS Code version: Code - Insiders 1.32.0-insider (1c50a87561055485d93a3961160902308497f1e3, 2019-02-08T06:16:17.233Z) OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel® Core™ i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.88GB (18.29GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none