Input text pbs : (1) textbox allows no input ; (2) textinput demo qwerty instead of azerty


I again encounter a pb with editable text online. I have made a minimal version of the task here :
URL of experiment:

Description of the problem (1):
I tried to present a textbox to get a sentence as answer to a question. I first tried with textbox component, and after that with input text demo (see below).
The problem with the textbox component is that I cannot edit it. It takes no input, even if I try to click on it.

What I have attempted

  • put all the keyboard components to “store last key” (as here) : still impossible to type.
  • add : reponse_RL.editable = true; and ‘reponse_RL.editable = true’ in “each frame” tab of a code component : nothing.
  • disable the mouse component… idem.

Since, none of this (and perhaps some other more or less sensible manipulations I have forgotten) did work, I tried to use the input text demo. But then I faced other problems

Description of the problem (2):
Presenting a textbox with input text demo.
Now I can write but :

  • keys are taken as if my keyboard was an qwerty, while it is an azerty ;
  • when I press some “special” keys (i.e. : space, comma, point, semicolon, etc. ) the corresponding word is presented (i.e. ‘space’ instead of ’ ').

I run out of ideas… I do not know which option will be worth working on, and I do not know how to fix either of the problems…
Can someone help me, please ?

Regards, D

  1. If you are using an editable text box, you need to avoid keyboard components in the same routine which accept keys you want to show in the text box.

  2. To use code-based text input you need to manually deal with keys that are wrongly interpreted. You could determine which keyboard someone is using by asking them to press the a key and recording whether they press a or q.

My self paced reading demo uses a textbox. You can try it here.

1 Like

Thanks a lot @wakecarter,

I copied elements from your demo, and --I am not completely sure how-- it works ! :slight_smile:

For those who would encounter the same problem, I also noticed that the order of elements seemed important too (i.e. code ‘textbox._pixi.focus()’ after the textbox).

Thanks again. Regards, D.

You can’t focus on a textbox that hasn’t yet been drawn.

1 Like