I want to read all keys that are pressed.
With the code i used i read only max 2 keys (Number/Letters/Return/Space/...)

Additional to those 2 keys i can read no more of theses keys. The only keys i am able to read additional are (CTRL(left/right) / ALT(left/right)/SHIFT(left/right)) ...
So how am i able to read a key-combination like (wheather it makes sence or not):
'W'+'A' (moving northwest) +'R' (run quickly) + 'J' (jump)
This is the code i used:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Code:
kbState = Keyboard.GetState();
Keys[] pressedKeys = (Keys[])kbState.GetPressedKeys();
if (pressedKeys != null)
{
foreach (Keys k in pressedKeys)
{
switch (k)
{
case Keys.W : classObjectX.moveUp(); break;
case Keys.A : classObjectX.moveLeft(); break;
case Keys.S : classObjectX.moveDown(); break;
case Keys.D : classObjectX.moveRight(); break;
case Keys.J : classObjectX.jump(); break;
case Keys.R : classObjectX.run(); break; // run fast not only walk
case Keys.Escape :
{ ProgrammState.Pause();
...
}break;
...
}
Thx! Tom
