本文整理汇总了C++中TApaTask::SendKey方法的典型用法代码示例。如果您正苦于以下问题:C++ TApaTask::SendKey方法的具体用法?C++ TApaTask::SendKey怎么用?C++ TApaTask::SendKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TApaTask
的用法示例。
在下文中一共展示了TApaTask::SendKey方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessCommandL
void CAknKeyLockControl::ProcessCommandL(TInt aCommandId)
{
if ( aCommandId == KKeyLockControlAnyKey )
{
if ( !iPhoneQueryOnScreen )
{
iPhoneQueryOnScreen = ETrue;
// show phone query
ShowLockPhoneQueryL();
}
}
else if (aCommandId == EAknSoftkeyUnlock)
{
iPhoneQueryOnScreen = EFalse;
if ( iAutolockEnabled )
{
TApaTaskList aList(iCoeEnv->WsSession());
TApaTask aTask = aList.FindApp(TUid::Uid(0x100059B5));
if ( aTask.Exists() )
{
DisableKeylock();
iNotif->NotifyStatusChange(EHideSoftNotifications);
TKeyEvent keyEvent;
keyEvent.iCode = EKeyBell;
aTask.SendKey(keyEvent);
SendMessageToSysAp(EEikKeyLockPowerKeyPressed);
}
// else we do nothing, Autolock application was not ready yet.
}
else
{
if ( iFeatureKeypadNoSlider )
{
//Show note "Now press *".
//Note is shown when user has pressed "Unlock" when keypad is in locked state
iConfirmationNoteAsterisk->ShowNote(
CAknNoteDialog::EShortTimeout,CAknNoteDialog::EConfirmationTone);
}
else
{
iConfirmationNote->ShowNote(
CAknNoteDialog::EShortTimeout,CAknNoteDialog::EConfirmationTone);
}
iUnlockConfirmation = ETrue;
}
}
else if (aCommandId == EAknSoftkeyLock)
{
// Lock keys
DoExitOfferKeylock();
EnableKeylock();
}
else if (aCommandId == EAknSoftkeyExit)
{
// Cancel offer keylock CBA
DoExitOfferKeylock();
}
else if (aCommandId == EAknSoftkeyEmpty)
{
if (iKeyLockEnabled)
{
ShowLockedNote();
}
}
else if (aCommandId == KNoteCmdFocusLost)
{
// Locked note has become unfocusd - get rid of it
if (iOfferLockEnabled)
{
DoExitOfferKeylock();
}
}
}