Trouble with a TEXT BOX ( input box ) and AZERTY keyboard layout.(accented char.

Started by MilesMando, Thu 24/05/2007 16:12:22

Previous topic - Next topic

MilesMando

Hello and first of all thank you for all.

...and sorry because I do not control English well.

Im code noob so,

How to use the keys of a foreign keyboards in a control “text box” (input) ?
because for the french AZERTY keyboard the digits 0 to 9 are on the same keys, but to be typed the shift key must be pressed. The unshifted positions are used for accented characters.

or

how to simulate a striking of key when input box is active ??,
this dont work and freeze the game like a pause:

(in interface click)

Code: ags

if ((interface == 14) && (button == 9)) {
on_key_press(49);

String text = cororep2.Text;
text = text.Append("à _ my accented character");
cororep2.Text = text;

return;
  
}
}





thank you miles time and that the angel for the videogames you guards all !

MilesMando

OK sorry its solved

Just set the gui "persistent" and put the code on "on key pressed" :


Code: ags

 if (keycode==233) {    //for exempl the french "a" with an accent
  String text = mycontrol.Text;
  text = text.Append("x");   //  x is the character 
  mycontrol.Text = text;
}

SMF spam blocked by CleanTalk