Comment/uncomment keyboard shortcut doesn't work in my keyboard layout


#1

Hey so the CMD+/ shortcut does not work in my keyboard layout: Swedish/Finnish layout, macOS.

Here’s why: the “/” character in this layout is SHIFT+7. Pressing CMD+SHIFT+7 triggers the “Help” menubar item in Chrome and Firefox. In Safari it does nothing.

Any keyboard shortcuts involving slashes, brackets etc. are likely to fail in many non-US keyboard layouts since they’re also often behind shortcuts like the above. Another example would be Sublime’s CMD+[] indent/unindent shortcuts: [] in this layout are under ALT+89. (I don’t know if these should or shouldn’t work in Glitch, since tab/shift+tab works fine.)

I’ve run into this exact same issue in the past when trying out early releases of new code editors. The solution has always been adding fully customizable keyboard shortcuts, but I’m guessing that’s already on your roadmap. :slight_smile:

Meanwhile, is there any chance this could be temp-fixed somehow? Unless there’s already a hidden alternative shortcut I’m missing, this issue should be affecting nearly every Finnish and Swedish user. :S

Keep up the good work!


#2

custom keyboard shortcuts are in the roadmap but it’ll be a while. As a bandaid fix for now you can define your own js keyboard commands with a browser extension that maps keycommands to browser console commands (e.g. https://chrome.google.com/webstore/detail/shortkeys-custom-keyboard/logpjaacgmcbpdkdchjiaagddngobkck?hl=en).

The command for commenting is application.editor().toggleComment
and other commands use the format application.editor().execCommand('selectAll') . the list of those commands are in https://codemirror.net/doc/manual.html#commands

def let us know if you’re still having problems