×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    Testing For Middle Soft Key Label

    Hi, I'm developing an application for S60 v3.1 and v3.2, and the softkey label is available on 3.2 phones, but a 3.1 phone like the N95, while it does have the MSK, does not have an MSK label, so I wish to have an options menu instead of an immediate action for the left softkey.

    To do this, I need to detect if a phone supports MSK labels or not, but I can't find a way to test for that. I tried what was said in the documentation which is this:

    Code:
    #include <centralrepository.h>
    #include <avkoninternalcrkeys.h>  // KAknMiddleSoftkeyEnabled
    
        TInt MSKenabled( 0 );
        CRepository* cenRep = NULL;
        TRAPD( err, cenRep = CRepository::NewL( KCRUidAvkon ) );
        if ( !err )
            {
            err = cenRep->Get( KAknMiddleSoftkeyEnabled, MSKenabled );
            delete cenRep;
            }
    However, avkoninternalcrkeys.h doesn't get found, and a search on Google yields nearly nothing.

    Does anyone know how to test for MSK label support?

  2. #2
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Testing For Middle Soft Key Label

    Welcome to the Forum Nokia Developer Discussion Boards.

    Try to use AknLayoutUtils::MSKEnabled() method, which returns ETrue if MSK is enabled.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    Re: Testing For Middle Soft Key Label

    Quote Originally Posted by A.A.M. View Post
    Welcome to the Forum Nokia Developer Discussion Boards.

    Try to use AknLayoutUtils::MSKEnabled() method, which returns ETrue if MSK is enabled.
    Hi A.A.M., thanks for your reply.

    The function you mentioned tests if the application has enabled the MSK, and it is set when the application is constructed. In this case, it will return true, as my application is making use of the MSK. What I want to know is a bit trickier, which is whether or not the MSK's label that sits directly above the MSK will be visible or not. If so, I will make use of it, and just have 3 softkey options, left middle and right. If not though, I want to compress the middle and left soft key's actions into an options menu, which will be activated by the left soft key.

  4. #4
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Testing For Middle Soft Key Label

    Also you can try to use MSKEnabledInPlatform() method (returns ETrue if the middle softkey is supported in the plaftorm).

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    Re: Testing For Middle Soft Key Label

    Quote Originally Posted by A.A.M. View Post
    Also you can try to use MSKEnabledInPlatform() method (returns ETrue if the middle softkey is supported in the plaftorm).
    Ah, this looks like what I want. It's not a static function though, of CEikCba, so I'd have to instantiate an object of that type to call this function. Is there something I can pull a CEikCba object out of, that already exists? The documentation says it's used in Avkon but doesn't say where.

  6. #6
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    Re: Testing For Middle Soft Key Label

    Quote Originally Posted by xevix View Post
    Ah, this looks like what I want. It's not a static function though, of CEikCba, so I'd have to instantiate an object of that type to call this function. Is there something I can pull a CEikCba object out of, that already exists? The documentation says it's used in Avkon but doesn't say where.
    Also, this CEikCba seems to be uninstantiable, so I guess this is impossible after all.

Similar Threads

  1. Replies: 6
    Last Post: 2009-07-22, 09:44
  2. problem for right soft key
    By abhi560 in forum Symbian
    Replies: 6
    Last Post: 2009-07-04, 11:45
  3. Right Soft key is not working
    By abhi560 in forum Symbian
    Replies: 0
    Last Post: 2009-07-02, 11:46
  4. Replies: 8
    Last Post: 2009-01-24, 06:00
  5. soft key bug in 3410 JVM
    By jeep_ in forum Mobile Java General
    Replies: 1
    Last Post: 2002-07-03, 11:25

Posting Permissions

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