The Copy Line Down shortcut does nothing in VS Code on Linux
Copy Line Down does nothing when the key combination is pressedShort answer
A shortcut does nothing when something else gets the keys first or when another entry for the same keys wins. Use VS Code's keyboard troubleshooting log to see whether the keys arrive, then Show Same Keybindings for conflicts. The command is editor.action.copyLinesDownAction, which you can rebind.
Fix it fast
1Find out which cause you have
Turn on key logging and press the shortcut in the editor. The Output panel shows which key VS Code received and which command ran.
Command Palette -> Developer: Toggle Keyboard Shortcuts Troubleshooting2Match what you see, then jump to its fix
- 1
The troubleshooting log shows nothing when you press the combinationThe operating system or another program takes the keysFix - 2
The log shows the key arriving, but a different command runsAnother entry uses the same keys, or a user rule overrides itFix - 3
The shortcut works in an editor but not in another panel such as a terminal or the search boxThe when clause is false where you are typingFix
- 1
What does the error look like?
Copy Line Down does nothing when the key combination is pressedA new key combination in the Keyboard Shortcuts editor does not take effect
Cause 1 of 3
The operating system or another program takes the keys
1Check
A combination the OS or another application already uses may never reach VS Code. The VS Code docs also warn that a graphics driver such as NVIDIA's may override some default shortcuts.
Press the keys in another text editor; if that also does nothing, the desktop or driver is consuming them.2Fix
Free that combination in the desktop's keyboard settings, or bind Copy Line Down to a different combination in the Keyboard Shortcuts editor.
// keybindings.json
[
{ "key": "ctrl+alt+d", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" }
]3Verify
Press the new combination in an open file.
The current line is duplicated below the cursor.Confirmed by code.visualstudio.com
Cause 2 of 3
Another entry uses the same keys, or a user rule overrides it
1Check
In the Keyboard Shortcuts editor, right-click the entry and choose Show Same Keybindings; use Show User Keybindings to see only your own rules.
Command Palette -> Preferences: Open Keyboard Shortcuts2Fix
Change or remove the conflicting entry in the Keyboard Shortcuts editor, or give Copy Line Down another combination.
// keybindings.json: give Copy Line Down keys that Show Same Keybindings reports as unused
[
{ "key": "ctrl+alt+j", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" }
]3Verify
Show Same Keybindings now lists only one command for the keys.
Right-click the entry again and choose Show Same Keybindings.Confirmed by code.visualstudio.com
Cause 3 of 3
The when clause is false where you are typing
1Check
A binding runs only when its when clause is true. Read the clause in the Keyboard Shortcuts editor or in the default keybindings JSON.
Command Palette -> Preferences: Open Default Keyboard Shortcuts (JSON)2Fix
Click into the file you are editing first, or edit the entry's when clause to cover the place you press it.
{ "key": "ctrl+alt+d", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" }3Verify
Press the shortcut with the cursor in the editor.
The line is copied.Confirmed by code.visualstudio.com
How do I stop it coming back?
- Check Show User Keybindings now and then so old custom rules do not pile up.
- Pick custom shortcuts that Show Same Keybindings reports as unused.
- Keep keybindings.json in your synced settings so every machine behaves the same.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Servers
dnf cannot install MySQL on Amazon Linux 2023
dnf cannot find a mysql-server package on Amazon Linux 2023
Amazon Linux 2023 documents MariaDB, not MySQL, as its database server, with packages named mariadb105 and mariadb105-server.
3 causes, each with a fixServers
Ansible hangs, then times out waiting for the sudo prompt
a playbook using become seems to hang
Ansible ran sudo on the target and never saw the answer it expected.
3 causes, each with a fixServers
Apache on Ubuntu returns 404 Not Found for my site
The requested URL was not found on this server.
On Ubuntu a 404 from Apache usually means the request maps to a path that has no file.
3 causes, each with a fixServers
Apache returns 504 Gateway Timeout when PHP takes too long
Quick requests work, slow ones end in a 504 after a fixed wait
A 504 from Apache means the backend did not answer within the proxy timeout.
2 causes, each with a fixServers
Apache logs SIGWINCH and exits on its own
the httpd container stops although nothing crashed
SIGWINCH is Apache's graceful-stop signal.
2 causes, each with a fixServers
Apache warns that a ${VAR} config variable is not defined
${VAR} left unchanged in the configuration, with a warning in the error log
Apache expands ${VAR} from Define or from the shell environment that exists when the server starts.
3 causes, each with a fix