For some reasons (partly due to the unresolved bugs in the AIR platform & partly for learning purposes) I am trying to build a virtual soft keyboard class. It will be a simple keyboard like looking object which will dispatch key pressed events.
Now the difficult part I guess would be the text input field which will take inputs from this object. I want the field to be exactly like the TextInput component of feathers, with focus cursor blinking, range selection, insertion of text at the cursor position, cut/copy/paste etc.
I tried looking into the TextBlockTextEditor class of Feathers and I am trying to modify it such that I can somehow pass inputs from my virtual keyboard to the texteditor.
Following are my confusions and want opinion on the correct approach to go with :
- first of all, Josh suggested me to check TextBlockTextEditor, but on the documentations & other tutorials it is recommended NOT to use it on mobile devices. I want this for mobile devices only.. so I am a bit confused now ?!!
- a direct approach that seems correct to me is to directly handle my custom keypress events in the 'stage_keyDownHandler' with (my custom) charCode & keyCodes, so basically replacing the stage's key_down event. I am probably going to try this approach, but I just wanted to make sure if this would be the right thing, as it seems too easy (well apparently all the other heavy complicated stuff is already being done in the class).