Closed rloporp closed 1 year ago
Thanks for reporting the issue! So what key binding(s) do you suggest as a Mac user?
I'm both a Mac/Linux user. TBH I don't have a strong opinion about any specific keyboard shortcut, feel free to choose whatever you prefer. Thank you!!
Sure! Most probably I go with the same shortcuts in Linux and Mac (Ctrl+Shift+{6..9}).
Ahhhh, now I got the misunderstanding:
Ctrl
+ Shift
+ 7
(Ctrl
+ /
) toggles line comments in several ISO keyboard layouts, including Danish, Italian, Portuguese, Spanish, Swedish, Turkish, etc.
You probably have an ANSI keyboard with the /
somewhere else.
So, to sum up, in order to suffer the problem, two circumstances must concur:
I spent some minutes learning from Wikipedia, and the /
collision also happens on ANSI Spanish keyboards (several million users there).
Interesting! Yeah I set the shortcuts based on English layout (where ? and / sit near right Shift). I guess the safer option would be a combination with letters. Maybe Ctrl+Shift+E, Ctrl+Shift+D, Ctrl+Shift+H, Ctrl+Shift+X.
I'm afraid VSCode core keyboard shortcuts are already "crowded":
Ctrl
+ Shift
+ E
: View: Show ExplorerCtrl
+ Shift
+ D
: View: Show Run and DebugCtrl
+ Shift
+ H
: Search: Replace in FilesCtrl
+ Shift
+ X
: View: Show ExtensionsMaybe you can leave the shortcuts empty and let the end users choose their own (?).
I assume having a set of default keybindings is a good idea, as it works out of the box for a variety of users (for sure, users can customize it afterward).
I spent some time to check what is the best practice and it seems having a keybindings using chords (for instance Ctrl+k in Linux and Windows - ⌘+k in Mac) is the best option.
What do you think?
encode text to Base64: Ctrl+k Ctrl+4 (⌘+k ⌘+4 in Mac)
decode Base64 to text: Ctrl+k Ctrl+5 (⌘+k ⌘+5 in Mac)
encode Hex to Base64: Ctrl+k Ctrl+6 (⌘+k ⌘+6 in Mac)
decode Base64 to Hex: Ctrl+k Ctrl+7 (⌘+k ⌘+7 in Mac)
Maybe you should consider a different set of key bindings. With the current ones:
The current key binding for
decode Base64 to text
is (outside Mac) identical to the widely usedToggle Line Comment
, de facto disabling it.It took me very long to figure it why my line comment shortcut wasn't working, and it turned out that this extension had "broken" it.