Exactly. It's the same effect, just not the same key names. There are not
separate inputs for each key on most keypads. The pad is arranged in rows
and columns. A signal is sent out, periodically, on each row and then the
columns are polled, looking for the signals. When a signal is seen, the key
in the corresponding row and column position is 'down'. So, keys in
different columns can be seen as down at the same time, but keys in the same
column can't be distinguished.
Since, on a well-designed keypad, the Control, Shift, and Alt keys are each
in their own columns, they can be detected separately from every other key.
This allows them to be 'seen' properly in combination with all other keys.
However, since the number of columns is finite, you can't detect every key
in combination with every other key. The actual layout, however, is *not*
specified, at least on most devices, so one device might easily not work the
same, with respect to this situation, as *any* other.
I'm not aware of Smart Phones specifying this, so I think you're going to be
stuck unless you can find such a specification or derive one from specific
behavior on specific devices.
Paul T.
sebseb said:
Shift, Alt, Control ? on a Smartphone ? where are these keys ?
No but I just did additionnal test and it seems it's an hardware blocking
:S
I did that in a timer loop :
short[] keys = new short[256];
for (int i = 0; i < keys.Length; i++)
keys
= GetAsyncKeyState(i);
if (keys[48] != 0) // this is 0 phone key
// jump
if (keys[37] != 0) // this is left pad-key
// turn left
if (keys[39] != 0) // this is right pad-key
// turn right
but as long as I press Right (holding the key), I can press jump (0 phone
key) but it's always ignored, and if I press Left (still holding the key),
so
as soon as I press the jump (0 phone key) everything freeze... then I
release
the 0 phone key and it goes on to walk left...
Someone could bring me lights about that please ?
Thanks
Paul G. Tobey said:
What keys, specifically, are you talking about? You should be able to
detect things like the Alt, Control, and Shift keys in combination with
basically anything. Regular keys, however, you might not be able to
detect
in combination with one another ("J" and "8", say).
Paul T.
Hi,
I'm programming in C# on a Smartphone 2003, and I have problem because
I
would like to be able to catch several key in the same time, for basic
example in a mere game, to be able to press acceleration button and to
turn
without releasing acceleration...
I tried in OnKeyPress event, does work, I tried also in a loop, using
GetAsyncKeyState but it seems to never work...
I would like to know if it's a hardware limit or if I did something
wrong...
I guess I did something wrong and would be very happy to have a tip to
help
Thank you in advance