587 views
in Embedded Wizard Studio by
In the chinese pinyin keyboard i need to enter number into the text editor without entering the space key as in Android keyboard.

In embedded wizard,space key is needed to enter numbers into the text editor

How to solve this issue

1 Answer

0 votes
by

Hi mvg,

you need to avoid that the text editor is sending the characters to the pinyin engine. This can be done at PinyinInput::TextEditor.onCharacterKey.

For example to exclude numbers from 0 to 9 you can write the following:

var char   ch  = CharacterKeyHandler.CharCode;
var string str = ch;

// Forward the character input to the pinyin input when its enabled but
// exclude numbers
if ( PinyinEnabled && (((int32)ch < (int32)'0') || ((int32)ch > (int32)'9')) )
{
  TriggerPinyinEvent( ch, Core::KeyCode.CharacterKeys );
}
else
...

Best regards,

Julian

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...