1. What is the enumeration for Select and exit keys, the soft keys?
I am handling events in my game like this,
TKeyResponse CHelloWorldContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType){
if(aType == EEventKeyDown){
switch(iGameState){
case 1:
switch(aKeyEvent.iScanCode) {
case EStdKeyUpArrow:
...
iScanCode is 164 &165 for select & exit (left soft key and right soft key) respectively. Also, what would the enumerations be for keys 0-9. What is the general way to find out? EStdKeyNkpX (0-9) isn't working (it's given in the sdk doc).
2. How do I exit an application from inside a container? exit() doesn't work.
As I am makin a game, I haven't associated any commands with those keys. I just want the enumeration for the keys so that I can handle them.
Since the role of these key can, and would be, different in different screens I can't handle them elsewhere.
Back key, or right soft key would in most screens would be used as a not an exit key but as a back key. In the main screen it would exit the application.
About how do I send an exit command to the appui's handle?
Also, what would the enumerations be for keys 0-9. EStdKeyNkpX (0-9) isn't working (it's given in the sdk doc). Nothing in the file uikon.hrh file about.
0-9 nine keys usually produce 0x30-0x59 (from my memory) as scancode, but nothing is there for those numbers even in e32keys.h
hmmm, are you sure you only want to catch the EEventKeyDown events. Most oftenly the actions should be handled when you have EEventKey instead. Anyway depends on the logic.
if(aType == EEventKey){
switch(aKeyEvent.iCode){
case '1':
break;
Basically I jsut want to handle any event only once, so I thought I'd handle it on key press down. But just to check for 0-9 keys, I did the above. Anyways the control doesn't come in. iCode is 49 on pressing 0 key. ScanCode is also 49.