OfferKeyEvent()

Login to reply to this topic.
Mon, 2005-03-07 05:28
Joined: 2004-08-25
Forum posts: 32
Hi all,

Recently I am writing a program for P910i, in there I want to capture the event from jog dail. But I can only find FourWayUP/Down/Left/Right/Confirm in the header. Does anyone know how to capture the event when I release after pressing on the jog dail?

Thanks very much!
Vincent

Mon, 2005-03-07 07:18
Joined: 2005-02-18
Forum posts: 18
OfferKeyEvent()
Jog events are defined in  <quartzkeys.h>


Code:
OfferKeyEventL(....)
{
switch(aKeyEvent.iCode)
{
case EQuartzKeyFourWayUp:
case EQuartzKeyTwoWayUp:
{
     break;
}
case EQuartzKeyFourWayDown:
case EQuartzKeyTwoWayDown:
{
    break;
}
case EQuartzKeyFourWayLeft:
   break;
case EQuartzKeyFourWayRight:
   break;
case EQuartzKeyConfirm:
   break;

}
}

Bags

Mon, 2005-03-07 08:25
Joined: 2004-08-25
Forum posts: 32
OfferKeyEvent()
I can capture these five events already. But If I want to classify the capture of confirm as press and release of the jog dail as two events, how can I do that?

Thanks.
Mon, 2005-03-07 11:16
Joined: 2005-02-18
Forum posts: 18
OfferKeyEvent()
You can check TEventCode with EQuartzKeyConfirm,

if( aType == EEventKeyUp && aKeyEvent.iCode == EQuartzKeyConfirm)
{
    // Jog dial confirm released
}

Bags

Mon, 2005-03-07 11:47
Joined: 2004-08-25
Forum posts: 32
OfferKeyEvent()
I have checked that, but it doesn't work. Anyway, thanks very much.

Thanks,
Vincent
Mon, 2005-03-07 12:52
Joined: 2005-02-18
Forum posts: 18
OfferKeyEvent()
Hi Vincent,

Worked perfectly after using aKeyEvent.iScanCode instead of aKeyEvent.iCode and EStdQuartzKeyConfirm instead of EQuartzKeyConfirm.

Code:
if(aKeyEvent.iScanCode == EStdQuartzKeyConfirm)
{
    if(aType == EEventKeyUp)
    {
    iEikonEnv->InfoWinL(_L("KeyUp"), _L(""));
    }
    else
    if(aType == EEventKeyDown)
    {
    iEikonEnv->InfoWinL(_L("KeyDown"), _L(""));
    }
   
}

Bags

Tue, 2005-03-08 02:46
Joined: 2004-08-25
Forum posts: 32
OfferKeyEvent()
Thank you very much ujjawal.

Thanks,
Vincent
  • Login to reply to this topic.