-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add Ctrl+/ as a shortcut to toggle comment in addition to Ctrl+K #79610
Add Ctrl+/ as a shortcut to toggle comment in addition to Ctrl+K #79610
Conversation
I don't see a strong argument for changing this, even as an addition, for everyone when you can configure it on your end however you want. Godot supports having multiple shortcuts per actions, so you can keep both by changing your editor settings. See also godotengine/godot-proposals#3822. |
I did a twitter poll and the results were favorable to this change: Most people already know the shortcut from using other popular script editors, and the ones who don't it's mostly because of their keyboard layouts, so keeping both seems like a great idea. Since we already use many of the other popular shortcuts I think it is good to include this one as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a reasonable change. Most editors use that by default, and it's always good to match the user's expectations on simple things like this.
Just to repeat myself from RC, this wasn't a very useful poll because we don't discuss replacing K with /. We are discussing this as an addition. So what we'd want to ensure is that / is actually a more popular alternative than other alternatives. From the responds to the linked proposal and to your poll it's not that clear, and many developers use a wide variety of shortcuts, either their own or defaults from other code editors. So TIWAGOS the results of this poll. |
@YuriSizov I get what you are saying, but not sure why you are saying it. Both options are clearly popular and there doesn't seem to be a downside in having both. If it was overwhelmingly one sided it would have changed my perception of the proposed change, but being that there are reasons to have both, and that people are happy with |
@coppolaemilio It doesn't look like you get what I'm saying 🙃 I'm pointing out that your poll was about choosing between Ctrl-K and Ctrl-/, but this PR doesn't pit them against each other. We are not discussing replacing Ctrl-K with Ctrl-/. We are discussing adding a second shortcut to go alongside the existing one. The question in the poll should be "If we are going to add a second one, which one should we add" with Ctrl-/ being one of the options and Ctrl-K not present at all. Because based on the answers in the proposal and on replies to your tweet, many people prefer different alternative shortcuts, not necessarily Ctrl-/. Edit: Simply put, yes, your poll shows that people would be happy with Ctrl-/, but it doesn't show that they won't be equally happy with some other alternative, like Ctrl-3 or whatever else people suggested. Edit 2: And I'm not saying we shouldn't merge this. Just that the data you've collected is not representative of community opinions and should be taken with a grain of salt. |
Since we aren't using Ctrl + / for anything right now, I don't see a problem with giving it a default binding. Unused keys are wasted keys 😶 |
Yay, I have the same problem as OP here :P |
Thanks! |
Shouldn't this shortcut be Ctrl + KP-Divide instead of Ctrl + /? |
I am stuck in an infinite loop of habits: Try to press Ctrl+/ in Godot, doesn't work, press Ctrl+K instead, get used to Ctrl+K, switch to VS Code, try to press Ctrl+K, doesn't work, press Ctrl+/ instead, get used to Ctrl+/, switch to Godot, try to press Ctrl+/ in Godot, doesn't work, press Ctrl+K instead...
Considering GDScript uses
#
as the comment symbol, I think Komment makes more sense than Ctrl+/ conceptually speaking, but we can add Ctrl+/ as an additional shortcut for users with VS Code muscle memory. Since Ctrl+K is at the start of the shortcut array, the keyboard shortcut text in the menu is still Ctrl+K.