Character code instead of key code

Character code instead of key code
0

I heed to detect character code typed on the keyboard. The event onKeyPressed returns key code but I need character code instead because I have different actions for ‘{’ and ‘[’, for example. Could you please advice how to obtain this codes. Thanks!