overriding, then passing on calendar hardware key

F

farseer

Hi,
i can take control of the calendar hardware key on my device. but my
problem is, i am having problems passing it on correctly so that the
calendar can still be opened with that key. here's what i am doing:

* i register the calendar key (194 on by device) with keymods = WIN.
this allows me to handle that key press
* after i am finished doing what i need to do, i then try to pass it on
by using the keybd_event function. there are several things i have
tried:

1. keybd_event (194, 0, KEY_DOWN, KEY_DOWN); //KEY_DOWN = 0
* this does NOT cause the calendar to appear

2. keybd_event (194, 0, KEY_DOWN, KEY_DOWN); //KEY_DOWN = 0
keybd_event (194, 0, KEY_UP, KEY_DOWN); //KEY_DOWN = 0, KEY_UP=2
* this DOES cause the calendar key to show up, but continuing to
hold down the key does not invoke the "calendar new function".

3. i have also tried wrapping the calendar keyb_event call with a call
using code 91, as i have noticed using spy, that a WM_KEYDOWN message
with 91 often accompanies a WM_KEYDOWN with 194, so this is what i do:
keybd_event (91, 0, KEY_DOWN, KEY_DOWN); //KEY_DOWN = 0
keybd_event (194, 0, KEY_DOWN, KEY_DOWN); //KEY_DOWN = 0
keybd_event (91, 0, KEY_UO, KEY_DOWN); //KEY_DOWN = 0

* unfortunately, as with # 1, this does not cause the calendar to
appear.

Any ideas on how i can pass thru the calendar key press correctly. #2
above is the closest if have come, but because i need to do a KEY_UP,
pressing and holding the calendar key does not cause the calendar to
open then create a new entry, as is normally the case.

thanks much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top