Cannot type special characters in Code Editor

Hi!

I am accessing PlayCanvas on an iMac, using a regular Windows keyboard. In the OS I have a custom keyboard layout set, to re-map the MacOS specific keys, as well as to move the special characters to the position I’m used to (eg.: {} is AltGr + b/n).

These work perfectly in any app (VSCode, Brackets, Xcode etc.) or browser running (I can type them here as well), however when I try to use any of these in the Code Editor of PlayCanvas, nothing is typed, the cursor jumps to another position, etc.

Using a regular english Mac layout, I can type these characters in as they are linked to SHIFT not AltGr.

Any ideas?

The code editor I think hooks into the key events directly. There’s been some issues with some layouts. I don’t think there is a way around this at the moment unfortunately.

I have yet to test with a Windows OS. I’ll report back with the findings, but it seems like that should work as expected.

Another somewhat related question.

In this case, is it possible to hook into the PlayCanvas editor somehow? Eg. Use a remote address for VSCode, and what I type there would be reflected in the editor? That would save us a lots of trouble.

Oh yeah, I forgot about this option :sweat_smile: https://github.com/playcanvas/playcanvas-sync

This will allow you use VSCode with PlayCanvas.

I’ll get to installing it. Thank you! :smile:

I’ll have to nag you a little bit more. When I try to do a pcsync pullAll, I get the following error:

3digit@3Digits-iMac PlayCanvas % pcsync pullAll
/Users/3digit/Documents/PlayCanvas/src/utils/common-utils.js:226
        return JSON.parse(s);
                    ^

SyntaxError: Unexpected string in JSON at position 88
    at JSON.parse (<anonymous>)
    at Object.readJson (/Users/3digit/Documents/PlayCanvas/src/utils/common-utils.js:226:21)
    at Object.jsonFileToMap (/Users/3digit/Documents/PlayCanvas/src/utils/common-utils.js:219:20)
    at ConfigVars.fromConfigFile (/Users/3digit/Documents/PlayCanvas/src/utils/config-vars.js:79:26)
    at ConfigVars.setOrigVals (/Users/3digit/Documents/PlayCanvas/src/utils/config-vars.js:63:14)
    at ConfigVars.run (/Users/3digit/Documents/PlayCanvas/src/utils/config-vars.js:49:20)
    at GetConfig.run (/Users/3digit/Documents/PlayCanvas/src/utils/get-config.js:13:42)
    at ComputeDiffAll.init (/Users/3digit/Documents/PlayCanvas/src/sync-commands/compute-diff-all.js:48:39)
    at ComputeDiffAll.run (/Users/3digit/Documents/PlayCanvas/src/sync-commands/compute-diff-all.js:36:16)
    at reportDiffAll (/Users/3digit/Documents/PlayCanvas/src/sync-commands/sync-utils.js:10:46)

Replying to myself and leaving it here in case anyone needs help.

I had to split the config files in two:

In my home directory, the .pcconfig contains the TARGET_DIR, API_KEY, BAD_FILE_REG and BAD_FOLDER_REG

In the target directory, the pcconfig.json contains the BRANCH_ID and PROJ_ID

1 Like