Hi,
Anyone know the iCode or iScanCode of Mailbox key of E61 device?
Please help me.
Hi,
Anyone know the iCode or iScanCode of Mailbox key of E61 device?
Please help me.
Hi I have to disble all the keys except '#', after pressing # a password window should open where we can put the password . My password is numeric. So that is fine in N91 but in E61 I am unable to enter number , because numbers are not appearing after numeric keys only alphabets
are appearing. I have written the code below..
TInt CSecureAppUi::LockKeys(TAny * params)
{
CSecureAppUi* iApp=(CSecureAppUi*)params;
TBuf<128> path;
path = iApp->ApplicationDriveAndPath();
path.Append(_L("\\"));
path.Append(KPasswordFile);
RFs fs;
fs.Connect();
RWsSession ws;
User::LeaveIfError(ws.Connect());
TRequestStatus status;
// create a window group for the thread
RWindowGroup wg(ws);
wg.Construct((TUint32)&wg, EFalse);
#ifdef __UIQ__
#else
// capture a key
/*
User::LeaveIfError(wg.CaptureKeyUpAndDowns(EStdKeyNo, 0, 0,EPriorityHigh));//red key 197
User::LeaveIfError(wg.CaptureKeyUpAndDowns(EStdKeyYes, 0, 0,EPriorityHigh));//green key 196
User::LeaveIfError(wg.CaptureKeyUpAndDowns(164, 0, 0,EPriorityHigh));//Soft key Yes 164
User::LeaveIfError(wg.CaptureKeyUpAndDowns(165, 0, 0,EPriorityHigh));//Soft key No 165
*/
for(TUint i=1;i<136;i++)
{
if(i!=1 && i!= 27 && i!=127)
User::LeaveIfError(wg.CaptureKeyUpAndDowns(i, 0, 0));
}
for(TUint i=146;i<163;i++)
{
///if(i!=164 && i!=165)
User::LeaveIfError(wg.CaptureKeyUpAndDowns(i, 0, 0));
}
for(TUint i=166;i<232;i++)
{
//if(i!=164 && i!=165)
User::LeaveIfError(wg.CaptureKeyUpAndDowns(i, 0, 0,EPriorityHigh));
}
/*
User::LeaveIfError(wg.CaptureKeyUpAndDowns(168, 0, 0));
User::LeaveIfError(wg.CaptureKeyUpAndDowns(169, 0, 0));
User::LeaveIfError(wg.CaptureKeyUpAndDowns(180, 0, 0));//menu key
User::LeaveIfError(wg.CaptureKeyUpAndDowns(197, 0, 0));//red key
///User::LeaveIfError(wg.CaptureKeyUpAndDowns(EKeyOff, 0, 0));//power key
User::LeaveIfError(wg.CaptureKeyUpAndDowns(180, 0, 0));
User::LeaveIfError(wg.CaptureKeyUpAndDowns(EStdKeyOff, 0, 0));//power key
User::LeaveIfError(wg.CaptureKeyUpAndDowns(EStdKeyYes, 0, 0));
User::LeaveIfError(wg.CaptureKeyUpAndDowns(EStdKeyNo, 0, 0));
User::LeaveIfError(wg.CaptureKeyUpAndDowns(EStdKeyDial, 0, 0));
User::LeaveIfError(wg.CaptureKeyUpAndDowns(167, 0, 0));//power key
User::LeaveIfError(wg.CaptureKey(42, 0, 0));
User::LeaveIfError(wg.CaptureKey(0, 0, 0));
///////////////////////////////////////////////////////////////////////////////////////////
*/
User::LeaveIfError(wg.CaptureKey(63586, 0, 0,EPriorityHigh));//Call select key
User::LeaveIfError(wg.CaptureKey(63587, 0, 0,EPriorityHigh));//
User::LeaveIfError(wg.CaptureKey(63557, 0, 0,EPriorityHigh));//ok key
User::LeaveIfError(wg.CaptureKey(EKeyIncVolume, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDecVolume, 0, 0,EPriorityHigh));
//User::LeaveIfError(wg.CaptureKey(EKeyDevice0, 0, 0,EPriorityHigh));
//User::LeaveIfError(wg.CaptureKey(EKeyDevice1, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice2, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice3, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice4, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice5, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice6, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice7, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice8, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice9, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDeviceA, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDeviceB, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDeviceC, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDeviceD, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDeviceE, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDeviceF, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice10, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice11, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice12, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice13, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice14, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice15, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice16, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice17, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice18, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice19, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice1A, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice1B, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice1C, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice1D, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice1E, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyDevice1F, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication0, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication1, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication2, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication3, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication4, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication5, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication6, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication7, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication8, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication9, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplicationA, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplicationB, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplicationC, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplicationD, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplicationE, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplicationF, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication10, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication11, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication12, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication13, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication14, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication15, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication16, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication17, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication18, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication19, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication1A, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication1B, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication1C, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication1D, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication1E, 0, 0,EPriorityHigh));
User::LeaveIfError(wg.CaptureKey(EKeyApplication1F, 0, 0,EPriorityHigh));
/////////////////////////////////////////////////////////////////////////////////////////
for(int i = 0; i < 103 ; i++)
{
if(i!=0 && i!= 20 && i != 68 && i != 67 && i != 66 && i != 9 && i != 10)
{
User::LeaveIfError(wg.CaptureKey(EKeyPrintScreen + i, 0, 0,EPriorityHigh));
}
}
#endif
// listen for the key presses
ws.EventReady(&status);
// hide this window group from the app switcher
wg.SetOrdinalPosition(-1);
wg.EnableReceiptOfFocus(EFalse);
// handle key events
for(;;)
{
User::WaitForAnyRequest();
if (status.Int()==KErrNone)
{
TWsEvent e;
ws.GetEvent(e);
TInt c;
TKeyEvent* aKeyEvent=e.Key();
c=aKeyEvent->iCode;
// do something with keypress
// if not ours, then send to top window group
// note that this breaks key repeat :-(
if(c)
{
if(!(BaflUtils::FileExists(fs, path)))
{
TInt wgid = ws.GetFocusWindowGroup();
User::LeaveIfError(ws.SendEventToWindowGroup(wgid, e));
break;
}
}
}
else
{
ws.EventReadyCancel();
}
ws.EventReady(&status);
}
// clean up
ws.EventReadyCancel();
fs.Close();
return KErrNone ;
}
So if any one has the solution to disable mailbox key and in edit box number can be entered, please help me
If you are using your own control as password dialog, you could simply do the abc->123 conversion for the E61 in a switch-case construct for example.
Hi ,
I au using this code for my password dialog box.
RESOURCE DIALOG r_password_dialog
{
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
items =
{
DLG_LINE
{
type = EAknCtQuery;
id = EGeneralQuery;
control= AVKON_DATA_QUERY
{
layout = ENumberLayout;
label = STRING_ENTERPASSWORD;
//control = NUMBER_EDITOR { min=0; max=999; };
control = AVKON_INTEGER_EDWIN
{
min = 0;
max = 999;
};
};
}
};
}
TInt number=0;
// create dialog instance; number is the descriptor that is used for // the editor
CAknNumberQueryDialog* dlg = new (ELeave) CAknNumberQueryDialog (number);
dlg->PrepareLC(R_PASSWORD_DIALOG);
// Set maximum and minimum to editor. This overrides values given in // resource. - optional
dlg->SetMinimumAndMaximum( 0, 1000000 );
// Launch the dialog
if (dlg->RunLD())
{
iAppUi.DeleteFile();
//iAppUi.iPassWord.Copy(password);
iAppUi.iPassWord.Copy(_L(""));
iAppUi.iPassWord.AppendNum(number);
iAppUi.CheckPwdPunching();
}
but in my password dialog box I getting only abc and ABC mode , I am not getting 123 mode. So please help me how can I get 123 mode? or how can I do the conversion abc->123?
Hi,
Numeric mode problem is solved , actually there is a key in E61 , after pressing that key 2 times numeric mode is enabled that I had blocked so I was unable to enter numbers. Now I have not disabled fn key so there is no numeric mode problem.