I'm trying to use KeyCurrentState() function to determine, if one of the buttons of a 5-way navigator is currently pressed (up,down,left,right,center). I use Zire 71 to test it.
First, I was trying to check the values, definied in KeyMgr.h:
#define keyBitRockerUp 0x00010000 // 5-way rocker up #define keyBitRockerDown 0x00020000 // 5-way rocker down #define keyBitRockerLeft 0x00040000 // 5-way rocker left #define keyBitRockerRight 0x00080000 // 5-way rocker right #define keyBitRockerCenter 0x00100000 // 5-way rocker center/press
But this didn't work; I couldn't determine a button pressed, KeyCurrentState() always returned 0
(actually not all bits '1', as described in help , but ok - this is not the point...)
I've tested the values which are really returned when some of those 5 buttons is pressed.
So, the real results are:
Up-button is pressed - KeyCurrentState() = 0x2 Down-button -"- = 0x4 Left-button -"- = 0x1000000 Right-button -"- = 0x2000000 Center-button -"- = 0x4000000
OK, "up" and "down", reffering to KeyMgr.h, is at least something similar - "keyBitPageUp" and
"keyBitPageDown". But where are the other values coming from ???
The question is: is it safe to check in my source code the bits, which are actually returned by
KeyCurrentState()? Or they can vary from 1 device to another, between different OS releases, and so on?
And what these values are?
Please help! Sergei Masich
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
