Writing curly braces on Mac in the code editor


I’m new to PlayCanvas so I apologise if this has been brought up before. Searching the forum didn’t give me any relevant answers.

For some reason, I’m unable to write curly braces: { and } in the code editor. I’m on a Mac so I should be able to do this using shift+alt+8 and shift+alt+9. It even works fine here in the forum, but in the code editor, nothing happens. I can write normal parenthesis and brackets, but not curly braces.

Has anyone else experienced this issue and is there a workaround?

What keyboard layout/locale do you have? There have been issues with some keyboard layouts and the code editor before due to hotkeys/shortcuts.

I’m on a Danish keyboard so I guess that might be an issue. However, I’ve never seen this issue before in any other code or text editor. That’s unfortunate.

Thanks for the reply :slight_smile:

Looking at the PlayCanvas editor, it looks like Shift + Alt + 8 is used for ‘go to tab 8’

Only thing I can suggest is to use some sort of text expander/replacement tool/extension to replace [` to { or https://pqrs.org/osx/karabiner/ to remap another key binding.

Or change the locale?

Just as Excess I’m on a Danish keyboard where {} by default is mapped to ALT+SHIFT+8/9 and it would be pretty damn nice if it was possible in PlayCanvas to modify the default keys.

Re-mapping using some 3. party tool is of course an option but since our default setup works everywhere else than PC that’s also a tiny bit annoying to do it that way. So hereby a feature request for optional remapping of keys in the PC codeeditor… Pretty please🙏

Alt-123 and Alt-125 on the numpad. Its kinda clunky, but frankly not that much clunkier than Alt+Shift+8/9. 1-2-3 and 1-2-5 are pretty easy to remember.

Of course, if you are on a laptop without a numpad this won’t be as useful.