hello,
I notice that GDKEYLIST structure
typedef struct _GDKEYLIST
{
DWORD vkUp;
DWORD vkDown;
DWORD vkLeft;
DWORD vkRight;
DWORD vkStart;
DWORD vkA;
DWORD vkB;
DWORD vkC;
} GDKEYLIST;
contains very pocket pc based keys - in a smartphone - how do i detect presses on numbers etc?
have I missed something in the documentation which is more smartphone specific?
reason is i need to implement keyboard entry - and would like to use the phone's keys for numbers and alphabets and capture it through getkeylist - is this even possible?
thanks
hawkeye
Hi,
I'm progamming for Symbian (or at least I try!). It is very easy presses on number, I just do the following and it works perfectly:
HRESULT CMyApplication::KeyDown(DWORD dwKey, GDKEYLIST& keylist)
{
if (dwKey == keylist.vkDown)
{
//Your action here
}
else if (dwKey == keylist.vkA)
{
//Your action here
}
else if (dwKey == keylist.vkB)
{
//Your action here
}
else if (dwKey == '0') //key 0
{
//Your action here
}
else if (dwKey == '1') //key 1
{
//Your action here
}
And so on for each number...
I hope this helps.
Vincent.
hello tetra,
wow! thanks a lot - that will help a lot - there are 2 keys which would be SOOOOO useful for me to map to - ie the top left and top right hand buttons - in the emulator, they are called the left and right softkeys
have you any ideas what is the 'reference' to these keys?
thanks again for helping out!
thanks
hawkeye
Hi,
glad I could help you.
If you are talking about the 2 keyys with a minus sign (don't know how to describe them better) used to confirm in every menus...
They are keylist.vkA and vkB.
I hope these are the keys you are looking for.
Vincent.
Hi Vincent,
again, thanks for your quick response. I tried it out but A and B seems to capture numbers 1 and 2 instead of the two buttons with the minus sign on the top.
:-\
joe
The keylist mapping is provided for keys that may be dynamic between devices or change with device orientation.
Other keys are (probably) fixed. So why don't you try sticking a breakpoint in your KeyDown handler and see what the value is? If you're not running in an emulator or debugger, try storing the value in KeyDown and displaying it in the next ProcessNextFrame.
If the value is in the range 32-127 then it's probably an ASCII code like '0' or '1'. Or look at winuser.h and see what VK_ value it corresponds to.
thanks!I will give it a try!
thanks again
hawkeye