This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

keyboard character: #

nestornestor Posts: 2Member

hi all
I would like to use GODOT. once wrote (in the old version 3) a small piece of code and found that I can not use special characters.. in particular the #.

Unfortunately, this has not changed with the current version. I usually use keyboard de-ch.

but it does not work with other keyboards either. what can I do?
thank you in advance.


  • TwistedTwiglegTwistedTwigleg Posts: 2,561Admin
    edited July 2019

    It is hard to say, it could be a bug or intended functionality. What are you wanting/needing to use the # character for? Which other characters are not working?

    In GDScript the # character is used to denote a comment, which is probably why it is not working in your code. As I mentioned in this post, you can convert characters from their ASCII code if needed, so you can use characters that otherwise would be hard, if not impossible, to use in Godot.

    For example, printing # would look like this:

    print (PoolByteArray([35]).get_string_from_ascii());

    There are probably easier ways to print the # character, but the above should work. You might just be able to use print "#", but I haven't tested so I'm not sure.

    Hopefully this helps!

    (Side note: Welcome to the forums!)

  • nestornestor Posts: 2Member

    Thanks for the answer.
    I would like to use it as planned - for comments.
    Unfortunately, it does not work with uk-en or with us-en to.

  • TwistedTwiglegTwistedTwigleg Posts: 2,561Admin

    Hmm, sounds like a bug. Theoretically it should work so long as you can input the # key, but I'm wondering if something is messing up how the editor reads the character. I would open a issue on the Godot GitHub.

Sign In or Register to comment.