I have this code in a module's on_key_press, literally like this :
int key;
...
Display(String.Format("key=%d", key)); //DEBUG
if (key == 91) //'['
text = text.AppendChar(92);
I put a breakpoint on text = text.AppendChar(92); .
When I execute, the Display shows "key=91". That would mean key == 91.
Yet, the if (key==91) is never true, and the instruction with the breakpoint is never reached.
What is this wizardry???
EDIT: actually it's only the breakpoint not happening. I don't know why. But that explains everything, and the script works as expected.