Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2006

    OfferKeyEventL question


    The helloworldplus example in the SDK displays an informationNote when the user pushes the "2" key. I am trying to modify the helloworldplus example in the SDK to display the informationNote when the user pushes 'a'. The application uses a view that is added on to the stack to handle key events. Inside the OfferKeyEventL method, instead of checking for the key press value '2', I am modifying that to (aKeyEvent.iCode == 97) which is unicode for 'a'. When I run this on the emulator, the program works fine if I push the 'a' key on the keyboard but not on the phone (emulator). Similarly even on the phone (I use Nokia 6682 running 2nd ed.SDK fp2), it will handle '2' but not 'a' for which i need to use the same '2' key. I figured that the phone is in "Numeric" mode and not Alpha mode and so no characters are being recognized. To convert to the aplha mode, I know we need to keep holding "#" key until it toggles but it does not ork in this case. I have tried all permutation combinations of keys (#, the pencil "edit" key etc..). I concluded that with just a "view" to handle key events, the phone is always in numeric mode and I dont know if we could set it to alpha mode using some method in the API. I did look into other examples such as the query and form examples and found that since they use dialogs, we could afford to switch between modes and hence, enter number query takes in numbers and enter name takes in alphabets. Is what I am thinking right?? If I now need to make the helloworldplus example accept characters, I need to add another control to the view??or is there a better way or am I wrong thinking this way?

    Thanks a lot for all the help!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Budapest, Hungary

    Re: OfferKeyEventL question

    You may try overriding the InputCapabilities method in your control.

  3. #3
    Registered User
    Join Date
    Sep 2006

    Re: OfferKeyEventL question


    Thanks for the reply. I did try modifying the InputCapabilities method as the following (return TCoeInputCapabilities::EAllText). Even now, I am not able to enter characters. I need to push the '2' key to get the character 'a' and it recogonizes that I am pushing the number '2' key but not the character. I have tried to do it by holding the "pencil" key down and pushing '2' and tried holding the '#' key down and pushing '2' but in vain. Do you know if I can toggle between input modes - numberic or alpha? I'm sure there is some way but dont know how to accomplish it.


Similar Threads

  1. a question about command and a question about s60
    By t4kesting in forum Mobile Java General
    Replies: 0
    Last Post: 2006-01-24, 08:21
  2. Replies: 2
    Last Post: 2004-01-08, 18:36
  3. Replies: 0
    Last Post: 2003-12-07, 16:06
  4. Sending data using iAcceptedSocket (Urgent question)
    By okegame in forum Bluetooth Technology
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts