Custom hotkeys (key combinations) in monaco command palette

Hi 3.0 is great so far, so a huge thank you for the great work!
Since i'm now also switching from ace to monaco, there a some habits that don't want to move so fast :wink:
Sooo is there a possibility to set custom shortcuts (key combinations) for monaco? Maybe in the settings file?!
For example i was used to crtl + d to delete a line, or ctrl+# for comment a line.
Would be great to have some custom shortcuts here.

Tbh, it doesn't take too long for the muscle memory to set. Additionally the shortcuts align with vscode so worth relearning. But to answer your question, there was no explicit API method added to permit this. Sorry.

True words! I'm using VSCode with mostly standard settings btw.
But there are still some drawbacks with german keyboard layout in my case.
You can't reach the ctrl+/ command for comment lines, for example, since you only can hit the "/" with shift+7 on german layout, so some customization would be useful...
Or is there a trick for other layouts? I haven't find it yet...

What shortcut do you use in VS code for comment/uncomment by default on a German keyboard? Have you tried that?

If you press F1 and enter the word comment on the command pallet, what shortcut is assigned?

VSCode's default for "Toggle Line Comment" is the same as monaco's ctrl+/ and you can't use that on DE layouts, so I changed it manually to ctrl+# and ctrl+numpad_divide in VSCode.

I just checked the browser version of VSCode and for some reason ctrl+# also isn't working there.
Only ctrl+numpad_divide works

What does ctrl+- do? (- on top row not NUM pad)

ctrl+- zooms out
The - and _ it's next to the right shift button

ctrl+numpad_divide for "Toggle Line Comment" hardcoded would be fine for me^^
It's the only thing i'm missing for german keyboard i think

I thought that was already mapped by default.
One more... What does CTRL-# do in your setup?

I thought that was already mapped by default.
One more... What does CTRL-# do in your setup?

Desktop version of VSCode does "Toggle Line Comment"
Browser version does nothing. If i try to set ctrl+# it shows ctrl+unknown (Firefox)

And there we go.. It seems to be a Firefox issue!
ctrl+# is working in Chromium :grinning:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.