0

I am working in a project which uses the Facebook graph-api to log in. I have the requirement of only using a virtual keyboard (no hardware will be present). I have looked everywhere, but can't find a solution for adding a virtual qwerty keyboard to the popUp.

I can put the keyboard into a popup, or I could add the qwerty keyboard into the screen with the addChild() method, but I still have one problem: the virtual keyboard does not focus to the textInputs of the popup and when i press a key, everything "explooota".


Anyone knows how i could solve the focus problem?

I mean... when i prees the virtual key, i call a java function wich simulate a physical keyboard, but i lose the focus into the facebook input text and the letter is not in the textinput... and i dont know how to recover the focus...

Thanks in advance for the help!

Dori
  • 915
  • 1
  • 12
  • 20
melli-182
  • 1,216
  • 3
  • 16
  • 29

1 Answers1

2

We had the same problem with a desktop app written in C#. I can only answer for a windows based application. Assuming you are working on a desktop app and that you are showing the login in a web browser control you can use the SendInput API to direct keyboard-like input to a field in the browser. We had our own custom keyboard; I don't think you will be able to use the built-in on-screen keyboard MS provides.

We had a windows form that hosted a web browser control and the keyboard custom control. The user touches the field that they want to fill in. The user types their input using the on-screen keyboard, the keyboard uses SendInput to send the appropriate character for the key that was touched to the web browser control. Other problems to look out for:

  • the facebook login form takes a lot of space, having both the keyboard and login visible at the same time is difficult
  • sending non-ascii characters; see this for help (SendInput sequence to create unicode character fails)
  • the user will have to touch to select the input field
  • there are other links on the FB login page you may want to restrict (like create an account)
  • an on-screen keyboard where touching the key doesn't steal focus from the browser field

These can all be solved but they are not trivial.

Community
  • 1
  • 1
  • Thanks you so much for your help rlm2!!! I will try what you said and then i tell you whats happen... Thanks you so mucho for you great answer! – melli-182 Oct 05 '11 at 13:29
  • The answer was very helpfull! thaks you so much for your time! – melli-182 Oct 06 '11 at 15:22
  • hello... finnally i implement what you tell me, but unfortunatelly i have the last problem taht you enum, when i touch the virtual qwerty i los focus on the browser and the letter is not written there... do you know how could i fix this??? Thanks in advance... – melli-182 Oct 07 '11 at 17:40
  • Matias, I'd open a new question for tagged for Flex that asks how to create a button that doesn't steal focus. –  Oct 10 '11 at 18:25
  • @rml2 Ok Thanks you so much... i will be looking for the question... Thanks! – melli-182 Oct 11 '11 at 10:33