How to Define a "control character" String Constant

If you create a string constant named “kControlChar,” how do you use the IDE to define the contents of that constant to be a non-printing character like tab, bell, cr, lf?

You can’t directly type the char into the value field.
You can’t do something like &c09 (that just makes a four char string constant)

Seems a very basic question, but I haven’t figured it out despite the user guide and years of RS usage.

You can specify a unicode codepoint with the &u literal. You may need to manually set the constant as a Number instead of a string.

You can do some of these things using the keyboard, but some like cr & lf don’t seem to be possible.

Create a new constant, give it a name & set it’s type to string. You should now see an elipses button next to the Default value - press it.

Now if you press the tab key it will be saved as &h09, + Z will be saved as &h10. But + m (&h0D) will not be saved nor will + j (&h0A).

Not consistent behavior.

Thanks. This was a minor thing that has bothered me intermittently for ages.

Yes, indeed you HAVE to set the string constant type as a Number, but the unicode codePoint worked.