Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cmd+c is not working on Visual Studio Code

I have following in settings:

{ "key": "cmd+c",                 "command": "editor.action.clipboardCopyAction",
                                     "when": "textInputFocus" },

This is driving me crazy, have tried everything but am unable to make copy command work in Visual studio code. I have to write click and then select copy. Shortcut does not show in VSC. Does anyone know why?

like image 910
NoviceMe Avatar asked Jun 09 '26 02:06

NoviceMe


2 Answers

Open your Keyboard Shortcuts by going to File > Preferences > Keyboard Shortcuts.

In the search bar at the top, type "cmd+c" to search for all shortcuts using those two keys. Now look at the "When" column for all instances of "textInputFocus". You need to make sure that the only command mapped to cmd+c during textInputFocus is the Copy command.

Below is an example where ctrl+c will fail to copy on my Windows setup because a second command is mapped to ctrl+c during textInputFocus.

enter image description here

like image 113
Alex Myers Avatar answered Jun 11 '26 21:06

Alex Myers


Ran into this issue too. Seemed to work again when I reopened (was closed) the terminal panel (cmd + `), focused the terminal (click it), and closed it again (click the x top right). I also toggled the side bar (cmd + b) and right side bar (cmd + option + b).

It is scary that the most popular IDE can have this much trouble copying text.

like image 29
microsoft_wtf Avatar answered Jun 11 '26 20:06

microsoft_wtf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!