microsoft / vscode

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

can't define keybinding for "prtsc" #183761

Open AustinNick opened 1 year ago

AustinNick commented 1 year ago

Type: Bug

I want to use prtsc button for snipping tool, but when i use the record key it won't show up, i already tried editing the keybindings.json and use the define keybinding (ctrl+k) and it won't recognize the button, i also already using the command to toggle keyboard shortcuts troubleshooting and it won't show up the prtsc key. When i use it outside vscode it run perfectly fine. sorry for my bad english.

VS Code version: Code 1.74.3 (97dec172d3256f8ca4bfb2143f3f76b503ca0534, 2023-01-09T16:59:02.252Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz (12 x 2688)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|15.74GB (3.16GB free)| |Process Argv|--crash-reporter-id 05f7c3e6-ef20-4335-bced-a2ff0f976dc1| |Screen Reader|no| |VM|0%|
Extensions (84) Extension|Author (truncated)|Version ---|---|--- vscode-openapi|42C|4.17.0 codesnap|adp|1.3.4 project-manager|ale|12.7.0 Nix|bbe|1.0.1 vscode-intelephense-client|bme|1.9.5 simple-react-snippets|bur|1.2.7 npm-intellisense|chr|1.4.4 path-intellisense|chr|2.8.4 gitignore|cod|0.9.0 doxdocgen|csc|1.4.0 dart-code|Dar|3.60.1 flutter|Dar|3.60.0 vscode-markdownlint|Dav|0.49.0 vscode-eslint|dba|2.4.0 git-extension-pack|don|0.1.3 githistory|don|0.6.19 es7-react-js-snippets|dsz|4.4.3 gitlens|eam|13.5.0 prettier-vscode|esb|9.13.0 git-project-manager|fel|1.8.2 code-runner|for|0.12.0 vscode-javac|geo|0.2.45 copilot|Git|1.86.82 go|gol|0.38.0 go-nightly|gol|2023.5.2420 mayukaithemevsc|Gul|3.2.4 discord-vscode|icr|5.8.0 latex-workshop|Jam|9.11.4 better-cpp-syntax|jef|1.17.2 graphql|mqu|0.1.2 vscode-docker|ms-|1.24.0 csharp|ms-|1.25.7 isort|ms-|2022.8.0 python|ms-|2022.20.2 vscode-pylance|ms-|2023.5.30 jupyter|ms-|2022.11.1003412109 jupyter-keymap|ms-|1.1.0 jupyter-renderers|ms-|1.0.14 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.266.1 remote-ssh|ms-|0.102.0 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.72.0 vscode-remote-extensionpack|ms-|0.24.0 cmake-tools|ms-|1.14.31 cpptools|ms-|1.15.4 cpptools-extension-pack|ms-|1.3.0 powershell|ms-|2023.5.0 remote-explorer|ms-|0.4.0 remote-server|ms-|1.1.0 vscode-serial-monitor|ms-|0.9.0 vsliveshare|ms-|1.0.5864 vscode-react-native|msj|1.11.0 indent-rainbow|ode|8.3.1 laravel-blade|one|1.34.0 nodejs-snippets|piy|0.0.2 material-icon-theme|PKi|4.27.0 excalidraw-editor|pom|3.5.1 vscode-thunder-client|ran|2.7.3 java|red|1.16.0 vscode-yaml|red|1.13.0 LiveServer|rit|5.7.9 tabnine-vscode|Tab|3.6.50 ayu|tea|1.0.5 vscode-pets|ton|1.22.0 cmake|twx|0.0.17 errorlens|use|3.8.0 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 vscode-arduino|vsc|0.6.0 vscode-gradle|vsc|3.12.6 vscode-java-debug|vsc|0.49.0 vscode-java-dependency|vsc|0.21.2 vscode-java-pack|vsc|0.25.11 vscode-java-test|vsc|0.38.2 vscode-maven|vsc|0.40.4 volar|Vue|1.6.4 console-ninja|Wal|0.0.133 quokka-vscode|Wal|1.0.542 php-debug|xde|1.32.1 html-css-class-completion|Zig|1.20.0 vscode-open-in-github|ziy|1.3.6 php-intellisense|zob|1.1.3 (5 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 2e4cg342:30602488 pyind779:30671433 89544117:30613380 pythonsymbol12:30671437 2i9eh265:30646982 showlangstatbar:30737416 pythonms35:30701012 pythonfmttext:30731395 fixshowwlkth:30730052 hidesbindicator:30730055 pythongtdpath:30739704 ```
vscodenpa commented 1 year ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.78.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

AustinNick commented 1 year ago

i just upgrade the vscode and the problem still remain.

ulugbekna commented 1 year ago

Hi @AustinNick ,

Thanks for filing the issue.

We'll try addressing the problem soon.


Dev notes:

PrintScreen sends only keyup event

image
nerdfever commented 4 months ago

Me too (on Win11).

The problem only occurs for me when VSCode is running As Admin (as it must to debug Python that needs to run As Admin).

More specifically, I didn't try to change the keybinding in VSCode. I just noticed that Win11's default snipping tool doesn't launch when VSCode (as Admin) is in the foreground. Somehow VSCode is eating the keybinding for PrtSc and not passing it to Windows.

But only when in Admin mode.

Perhaps this is a hint.