Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hello,
When I press "Left" key ISHELL_SendEvent returns "FALSE"
why?

" AEECLSID_SEND" is the id of the currently executing applet.

static boolean send_HandleEvent(IApplet * pi, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
AEEApplet * pMe = (AEEApplet * ) pi;
AECHAR buf[40];
switch (eCode)
{
case EVT_APP_START:
STR_TO_WSTR("Started", buf, sizeof(buf));
IDISPLAY_DrawText(pMe->m_pIDisplay, AEE_FONT_NORMAL, buf, -1, 0, 5, NULL, 0);
IDISPLAY_Update(pMe->m_pIDisplay);
return(TRUE);

case EVT_KEY_PRESS:
case EVT_KEY:

switch(wParam)
{
case AVK_LEFT:
STR_TO_WSTR("Left key ", buf, sizeof(buf));
IDISPLAY_DrawText(pMe->m_pIDisplay, AEE_FONT_NORMAL, buf, -1, 0, 5, NULL, 0);
IDISPLAY_Update(pMe->m_pIDisplay);

if(ISHELL_SendEvent(pMe->m_pIShell, AEECLSID_SEND,EVT_KEY,AVK_RIGHT,NULL)==TRUE)
DBGPRINTF("SUCCESSFULL");
else
DBGPRINTF("UNSUCCESSFULL");

break;

case AVK_RIGHT:

// ISHELL_StartApplet(pMe->m_pIShell, AEECLSID_SEND);
STR_TO_WSTR("Right key", buf, sizeof(buf));
IDISPLAY_DrawText(pMe->m_pIDisplay, AEE_FONT_NORMAL, buf, -1, 0, 5, NULL, 0);
IDISPLAY_Update(pMe->m_pIDisplay);
break;

default:
break;
}

return TRUE;

case EVT_APP_STOP:
return TRUE;

default:
break;
}
return FALSE;

"When I press "Left" key ISHELL_SendEvent returns "FALSE"
why?"
and
"if(ISHELL_SendEvent(pMe->m_pIShell, AEECLSID_SEND,EVT_KEY,AVK_RIGHT,NULL)==TRUE)"
maybe it need to change to "if(ISHELL_SendEvent(pMe->m_pIShell, AEECLSID_SEND,EVT_KEY,AVK_LEFT,NULL)==TRUE)" and to see if it true.

"When I press "Left" key ISHELL_SendEvent returns "FALSE"
why?"
and
"if(ISHELL_SendEvent(pMe->m_pIShell, AEECLSID_SEND,EVT_KEY,AVK_RIGHT,NULL)==TRUE)"
maybe it need to change to "if(ISHELL_SendEvent(pMe->m_pIShell, AEECLSID_SEND,EVT_KEY,AVK_LEFT,NULL)==TRUE)" and to see if it true.

I guess you can't send EVT_KEY events in BREW 2.0.
I know that you can't Post those for sure...
Anyway, if you want the AVK_RIGHT handler to execute - just remove BREAK from your left key handler...

I guess you can't send EVT_KEY events in BREW 2.0.
I know that you can't Post those for sure...
Anyway, if you want the AVK_RIGHT handler to execute - just remove BREAK from your left key handler...

Thank you people for reply.
Actually I want send event to other applet.
So now I want to know whether
ISHELL_SendEvent & ISHELL_PostEvent works on BREW2.0
or not.
if not it works on which version of BREW.

Thank you people for reply.
Actually I want send event to other applet.
So now I want to know whether
ISHELL_SendEvent & ISHELL_PostEvent works on BREW2.0
or not.
if not it works on which version of BREW.

Try sending/posting events that aren't EVT_KEY, such as EVT_USER.
-Tyndal

Try sending/posting events that aren't EVT_KEY, such as EVT_USER.
-Tyndal

Send event or post event with "EVT_USER" & "EVT_COMMAND"
is working.
"EVT_KEY" is not working.
I have a game developed by somebody. If I wany to send
left ,right etc key events to the game , how can I do this?

Send event or post event with "EVT_USER" & "EVT_COMMAND"
is working.
"EVT_KEY" is not working.
I have a game developed by somebody. If I wany to send
left ,right etc key events to the game , how can I do this?

hi...
wheneve there is a key press EVT_KEY is generated and event specific data is avialable in wParam, dwParam....
you need to capture the key code in your handler and then for each case need to process the event....
for more you can step through any of the examples that comes with SDK....
sdg

hi...
wheneve there is a key press EVT_KEY is generated and event specific data is avialable in wParam, dwParam....
you need to capture the key code in your handler and then for each case need to process the event....
for more you can step through any of the examples that comes with SDK....
sdg

Hi all,
My question is
say i am in applet 'A'
ISHELL_PostEvent(pIShell, B ,EVT_KEY,X,0);
B->class id of another aplet.
x->AVK_1
_2
AVK_RIGHT etc
works with BREW2.0 or not.
For me it is not working.

Hi all,
My question is
say i am in applet 'A'
ISHELL_PostEvent(pIShell, B ,EVT_KEY,X,0);
B->class id of another aplet.
x->AVK_1
_2
AVK_RIGHT etc
works with BREW2.0 or not.
For me it is not working.

hi...
when u r in applet A, and you want to process some event of B, then first you have to close A and load B....
A will not respond to events on B when it is active....
sdg

hi...
when u r in applet A, and you want to process some event of B, then first you have to close A and load B....
A will not respond to events on B when it is active....
sdg

Sir you mean
p = pointer to the currently executing applet.
if(ISHELL_PostEvent(p->m_pIShel l, gameId , EVT_KEY_PRESS , AVK_RIGHT , 0) == TRUE)
ISHELL_StartApplet(p->m_pIShell, gameId);
ISHELL_CloseApplet(p->m_pIShell, 1);
But ISHELL_Close closes all active applications and returns to the idle screen.

Sir you mean
p = pointer to the currently executing applet.
if(ISHELL_PostEvent(p->m_pIShel l, gameId , EVT_KEY_PRESS , AVK_RIGHT , 0) == TRUE)
ISHELL_StartApplet(p->m_pIShell, gameId);
ISHELL_CloseApplet(p->m_pIShell, 1);
But ISHELL_Close closes all active applications and returns to the idle screen.

If your second application is in the background or not active, it cann't receive any key event.
You don't need to close applet A, you can suspend applet A, and resume applet B.
What are you trying to achieve?
ruben

If your second application is in the background or not active, it cann't receive any key event.
You don't need to close applet A, you can suspend applet A, and resume applet B.
What are you trying to achieve?
ruben

ISHELL_PostEvent(p->m_pIShell, gameID,EVT_COMMAND,100,0)
this returns "TRUE"
but
ISHELL_PostEvent(p->m_pIShel l, gameId , EVT_KEY_PRESS , AVK_RIGHT , 0)
returns "false" WHY?
Please tell me whether ISHELL_PostEvent() works with EVT_KEY_PRESS (any other key events) or not.

ISHELL_PostEvent(p->m_pIShell, gameID,EVT_COMMAND,100,0)
this returns "TRUE"
but
ISHELL_PostEvent(p->m_pIShel l, gameId , EVT_KEY_PRESS , AVK_RIGHT , 0)
returns "false" WHY?
Please tell me whether ISHELL_PostEvent() works with EVT_KEY_PRESS (any other key events) or not.

As I have mentioned in my previous post, only active application can receive key events, you cann't pass it to inactive or background application.
If you need to do something in your other app, you can send your custom user events to do your application specific processing.
ruben

As I have mentioned in my previous post, only active application can receive key events, you cann't pass it to inactive or background application.
If you need to do something in your other app, you can send your custom user events to do your application specific processing.
ruben

Also, you CAN'T post or send EVT_KEY events programmatically in BREW 2.0. This works in BREW 1.1, but not in 2.0.
YOU JUST CAN'T!

Also, you CAN'T post or send EVT_KEY events programmatically in BREW 2.0. This works in BREW 1.1, but not in 2.0.
YOU JUST CAN'T!

Good morning.
I thank every body for replies .

Good morning.
I thank every body for replies .