×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    51°11'4.78"N -|- 2°48'27.05"E (Belgium)
    Posts
    730

    camera key scancode

    Hi,

    someone can recall me what is the scancode of the camera key in S60 3rd AND 5th ? I can find it back and it doesn't seem to be the same in the two edition ...

    Thanks,
    Domi.
    ----------------------------------------------------------------------------------
    FExplorer is my baby !

    you can get the FREE version from www.gosymbian.com
    you can get the PRO version from http://store.ovi.com/content/339454

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

    Re: camera key scancode


  3. #3
    Registered User
    Join Date
    Mar 2003
    Location
    51°11'4.78"N -|- 2°48'27.05"E (Belgium)
    Posts
    730

    Re: camera key scancode

    Hi,

    yeps, I had checked this wiki but it's for 2nd & 3rd edition !, is this the same for the 5th ed ?

    thanks for your fast reply,
    Domi.
    ----------------------------------------------------------------------------------
    FExplorer is my baby !

    you can get the FREE version from www.gosymbian.com
    you can get the PRO version from http://store.ovi.com/content/339454

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

    Re: camera key scancode

    Try to use EKeyCamera (EKeyDevice7) for the 5th ed.

  5. #5
    Registered User
    Join Date
    Mar 2003
    Location
    51°11'4.78"N -|- 2°48'27.05"E (Belgium)
    Posts
    730

    Re: camera key scancode

    Humm .. are you sure ?

    EKeyCamera is not defined in any include's and when using EKeyDevice7, my key is not captured in ::HandleKeyEventL although, in 3rd edition, EStdKeyApplication1A is processed correctly (that's mean that my code seems ok ....)

    thanks,
    Domi.
    ----------------------------------------------------------------------------------
    FExplorer is my baby !

    you can get the FREE version from www.gosymbian.com
    you can get the PRO version from http://store.ovi.com/content/339454

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: camera key scancode

    If you happen to have an actual device at hand, you could consider creating an application in 5-10 minutes for listing/logging codes you get in OfferKeyEventL.

  7. #7
    Regular Contributor
    Join Date
    Oct 2007
    Location
    China
    Posts
    269

    Re: camera key scancode

    Quote Originally Posted by wizard_hu_ View Post
    If you happen to have an actual device at hand, you could consider creating an application in 5-10 minutes for listing/logging codes you get in OfferKeyEventL.
    you don't need to write another app, you just debug your app and make a breakpoint in you OfferKeyEvet() function and chech its param, then you will get the answer.
    I am a programmer,and I hope we can help each other and progress together

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

    Re: camera key scancode

    Quote Originally Posted by Jeepy View Post
    Humm .. are you sure ?
    Unfortunately I don't have a device with 5th ed. So try to follow suggestions from previous posts.

  9. #9
    Registered User
    Join Date
    Mar 2003
    Location
    51°11'4.78"N -|- 2°48'27.05"E (Belgium)
    Posts
    730

    Re: camera key scancode

    yes, that's true, I have to catch the code from OfferKeyEventL but it seems that this code is not the same as received in HandleKeyEventL from an appli running in background ... but I'm maybe wrong !

    kind regards,
    Domi.
    ----------------------------------------------------------------------------------
    FExplorer is my baby !

    you can get the FREE version from www.gosymbian.com
    you can get the PRO version from http://store.ovi.com/content/339454

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,688

    Re: camera key scancode

    Personally I use the following code for checking keycodes
    Code:
    void CCodeCheckView::Draw(const TRect& /*aRect*/) const
    {
        CWindowGc& gc = SystemGc();
        TRect drawRect = Rect();
        const CFont* fontUsed;
    
        gc.Clear();
        fontUsed = iEikonEnv->TitleFont();
        gc.UseFont(fontUsed);
        for(TInt i=0;i<EVENTS;i++)
        {
            _LIT(KFormat,"%5d %5d %x %d");
            TBuf<40> buf;
            buf.Format(KFormat,iEvents[i].iScanCode,iEvents[i].iCode,iEvents[i].iModifiers,iEvents[i].iRepeats);
            gc.DrawText(buf,TPoint(0,(i+1)*fontUsed->HeightInPixels()));
        }
        gc.DiscardFont();
    }
    
    TKeyResponse CCodeCheckView::OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType)
    {
        for(TInt i=0;i<EVENTS-1;i++)
            iEvents[i]=iEvents[i+1];
        iEvents[EVENTS-1]=aKeyEvent;
        DrawNow();
        return EKeyWasConsumed;
    }
    Where CCodeCheckView is a CCoeControl, and
    Code:
    #define EVENTS 8
    TKeyEvent iEvents[EVENTS];

  11. #11
    Registered User
    Join Date
    Mar 2003
    Location
    51°11'4.78"N -|- 2°48'27.05"E (Belgium)
    Posts
    730

    Re: camera key scancode

    thanks, thanks & thanks for sharing this code (very usefull) !!

    Domi.
    ----------------------------------------------------------------------------------
    FExplorer is my baby !

    you can get the FREE version from www.gosymbian.com
    you can get the PRO version from http://store.ovi.com/content/339454

  12. #12
    Registered User
    Join Date
    Mar 2003
    Location
    51°11'4.78"N -|- 2°48'27.05"E (Belgium)
    Posts
    730

    Re: camera key scancode

    I have found the following scan code for the camera key :

    3rd ed : 0xF882 (63618)
    5th ed : 0xF880 (63616)

    it's strange that there is a difference ...

    Domi.
    ----------------------------------------------------------------------------------
    FExplorer is my baby !

    you can get the FREE version from www.gosymbian.com
    you can get the PRO version from http://store.ovi.com/content/339454

Similar Threads

  1. Replies: 106
    Last Post: 2009-05-11, 05:53
  2. Nokia Gamer (GamR) - concept phone
    By tgm91 in forum General Development Questions
    Replies: 4
    Last Post: 2008-10-01, 21:34
  3. Replies: 1
    Last Post: 2008-09-19, 03:45
  4. Capturing image from secondary camera problem
    By michaelnewyork in forum Symbian
    Replies: 7
    Last Post: 2008-09-08, 08:09
  5. not getting send (call or green) key event
    By vasant21 in forum Symbian
    Replies: 2
    Last Post: 2007-01-09, 17:31

Posting Permissions

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