Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default keybindings that conflict with default Ubuntu OS keybindings #509

Closed
Tyriar opened this issue Nov 23, 2015 · 18 comments
Closed

Default keybindings that conflict with default Ubuntu OS keybindings #509

Tyriar opened this issue Nov 23, 2015 · 18 comments
Assignees
Labels
*as-designed Described behavior is as designed linux Issues with VS Code on Linux
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Nov 23, 2015

Related #51

The following default keybindings conflict with default Ubuntu OS keybindings.

Move app to different workspace:

{ "key": "ctrl+shift+alt+down",   "command": "editor.action.copyLinesDownAction",
                                     "when": "editorTextFocus" },
{ "key": "ctrl+shift+alt+up",     "command": "editor.action.copyLinesUpAction",
                                     "when": "editorTextFocus" },
{ "key": "ctrl+shift+alt+left",   "command": "workbench.action.focusLeftEditor" },
{ "key": "ctrl+shift+alt+right",  "command": "workbench.action.focusRightEditor" },

Maximize/unmaximize(?):

{ "key": "ctrl+meta+up",          "command": "editor.action.insertCursorAbove",
                                     "when": "editorTextFocus" },
{ "key": "ctrl+meta+down",        "command": "editor.action.insertCursorBelow",
                                     "when": "editorTextFocus" },
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Nov 24, 2015
@alexdima
Copy link
Member

@Tyriar Again, would love your input to find better out of the box defaults

@egamma egamma modified the milestone: Backlog Dec 10, 2015
@alexdima
Copy link
Member

@Tyriar I think the changes for #51 also address this issue. Is that fair?

@Tyriar
Copy link
Member Author

Tyriar commented Dec 10, 2015

@alexandrudima did #51 change focus*Editor and copyLines*Action?

@alexdima
Copy link
Member

@Tyriar Sorry about that, it was getting late yesterday 😄 You're right, those ones I didn't touch

@fiznool
Copy link

fiznool commented Sep 9, 2016

Coming from ST3 I use ctrl-shift-d a lot to duplicate a line. I realise this conflicts with workbench.view.debug but thought I'd share here anyway.

@benbro
Copy link

benbro commented Sep 9, 2016

What about Ctrl+D to duplicate line?
This is used in both notepad++ and geany editors:
https://wiki.geany.org/howtos/sorted_keyboard_shortcuts
http://docs.notepad-plus-plus.org/index.php/Keyboard_And_Mouse_Shortcuts

{ "key": "ctrl+d",   "command": "editor.action.copyLinesDownAction",
                                     "when": "editorTextFocus" },
@fiznool
Copy link

fiznool commented Sep 9, 2016

Ctrl-d is currently used for multiple cursor selection, I also use this all the time so I'd vote for that to stay as it is!

@Tyriar
Copy link
Member Author

Tyriar commented Sep 9, 2016

Yeah ctrl+d is quite a well known keybinding so that definitely isn't going to change.

@mattez
Copy link

mattez commented Sep 27, 2016

I want to migrate to vscode but, like every body else on Ubuntu, really need to duplicate lines.
Any news about this?

What you recommend?:

  • change default Ubuntu keybindings? Here is how to on AskUbuntu. (I haven't tested yet. I don't want to tweak my OS coz of editor)
  • or change default keybindings of vscode? Is here any conflict free recommended key combination? Have any of you investigate it?

For now I create my custom keybindings of vscode.
To Ctrl+Shift+Alt+Up I added meta (In my case meta is win key Windows Key I don't understand it because it should be super not meta).
So I use
Windows Key+Ctrl+Shift+Alt+Up
or
Windows Key+Ctrl+Shift+Alt+Down
and vscode is duplicating lines now. What a surprice it works.

For newbies (like my self) go to File > Preferences > Keyboard Shortcuts and edit keybindings.json.

// Place your key bindings in this file to overwrite the defaults
[
{ "key": "meta+ctrl+shift+alt+down",   "command": "editor.action.copyLinesDownAction",
                                     "when": "editorTextFocus && !editorReadonly" },
{ "key": "meta+ctrl+shift+alt+up",     "command": "editor.action.copyLinesUpAction",
                                     "when": "editorTextFocus && !editorReadonly" }
]
@alexdima
Copy link
Member

@mattez Just customize vscode's keybindings -- File > Preferences > Keyboard Shortcuts.

[{ "key": "ctrl+shift+d", "command":"editor.action.copyLinesDownAction", "when": "editorTextFocus && !editorReadonly" }]
@mattez
Copy link

mattez commented Sep 27, 2016

@alexandrudima Thank you. I'm so impatient. I edited my previous comment, before I read yours. Now a little ashamed.
It is a pity that the Ctrl+Shift+D is now used to Show Debug workbench.view.debug. It may not suit to all to change this.

But I agree I'm newbie who don't use Debug yet. And also I don"t need two duplication actions (up & down) I need only one duplicate.

@divyanshu013
Copy link

Hi guys, I can help with this issue if there's a final decision on it. Recently migrated to vscode and ran into this problem today

@Tyriar
Copy link
Member Author

Tyriar commented Oct 2, 2017

I would be hesitant to do anything here as it could break people. However, if there are keybindings that differ on Windows and Linux but they're broken on Linux maybe we could look into this.

Also this issue applies specifically to Unity on Ubuntu which is now deprecated. I haven't checked what windows management keybindings Ubuntu Gnome ships out of the box but we should target them as the primary example on Linux going forward.

@cpxPratik
Copy link

Why is it not by default set to Ctrl+D and Ctrl+Shift+D for copy line up and down respectively?? Most editors have them on those bindings.

@Tyriar
Copy link
Member Author

Tyriar commented Oct 28, 2017

@cpxPratik since the initial version ctrl/cmd+d has been assigned to the "Add selection to next find match" command. I wasn't around to explain that decision but it's a very popular keybinding at this point so I doubt we would ever change the default.

@ryansully
Copy link

I think it's from Sublime Text; I remember using the same shortcut for that as well.

@cpxPratik
Copy link

@Tyriar I customized key-binding for copy line down with Ctrl+D and it works for both uses, i.e. "Add selection to next find match" too.

@alexdima
Copy link
Member

As we now have very many users on Linux (not only on Unity), I don't plan to make any changes to the default keybindings, as changes to the defaults will break the flow of folks not using Ubuntu + Unity.

I am sorry if this causes any grief, but it is very simple to customize keybindings. Furthermore, it is very simple to create an extension which customizes default keybindings. Such an extension could be published to the marketplace and called "Ubuntu Unity optimized keymap" etc.

@alexdima alexdima added *as-designed Described behavior is as designed and removed bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Dec 14, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed linux Issues with VS Code on Linux
9 participants