×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    11

    How to detect keyboard is open on N97

    Hi I try to find a way to detect when the keyboard is open on my n97.

    I'm tying to do this whit the serviceApi 1.0 and the FlipStatus

    Code:
    var criteria = new Object();
        criteria.Entity = "General";
        criteria.Key = "FlipStatus";
        try {
            var result = systemServiceObj.ISysInfo.GetInfo(criteria);
        }
        catch (ex) 
        {
            alert(ex);
            return;
        }
     
        if(result.ReturnValue.Status)
    	alert("Flip is open");
        else
    	alert("Flip is closed");
    But, this returns me that my keyboard is open even if it is close when i'm in landscape mode.

    I tried to detect the GripStatus and on my n97, it returns me GripStatus is always "true".
    What is GripStatus?


    So is there another way to detect this??
    Any widget event fired when the keyboard opens?

    Regards.
    Last edited by bduthoit; 2010-02-12 at 15:09.

  2. #2
    Registered User
    Join Date
    Nov 2008
    Location
    Chile
    Posts
    21

    Re: How to detect keyboard is open on N97

    I saw a keydown code when the keypad is open/close. Maybe that is the way to do that.

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    11

    Re: How to detect keyboard is open on N97

    That's a solution.

    I made another, using the flip status, and orientation sensors.

    So, when the orientation sensor returns "DisplayUpwards" or DisplayRightUp" and ths flipStatus is "1" i display the landscape mode.
    Last edited by bduthoit; 2010-02-16 at 13:59.

  4. #4
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: How to detect keyboard is open on N97

    If you just want to detect landscape mode, why not to check that is window width bigger than window height?


    Code:
    var viewWidth = window.innerWidth;
    var viewHeight =window.innerHeight;		
    
    var orientation = (viewWidth > viewHeight ? "landscape" : "portrait");
    -Ilkka

Similar Threads

  1. How to detect end of data input in CEikEdwin when onscreen keyboard is used.
    By palringosymbian in forum Symbian User Interface
    Replies: 1
    Last Post: 2010-01-13, 10:55
  2. On screen keyboard questions
    By dennis_munsie in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-12-11, 15:05
  3. PROBLEM WITH NOKIA N97
    By fairulamir in forum General Development Questions
    Replies: 2
    Last Post: 2009-11-06, 03:08
  4. Open C Console app on N97
    By fmcgeough in forum Open C/C++
    Replies: 1
    Last Post: 2009-06-15, 15:21
  5. Support for Open Type Fonts
    By ahmadn in forum General Development Questions
    Replies: 0
    Last Post: 2009-03-25, 07:43

Posting Permissions

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