Hello guys,
I am starting with freeglut and trying to implement a keybordListener.
Everything is fine, I can detect pressed keys and mouse movements.
But unfortunately everytime a key is pressed the mouse cursor stops moving.
I like to build a doomlike inputsystem.
Heres my Code.
I hope you guys can help me
void init(){
…
glutKeyboardFunc(keyboard);
…
glutMainLoop();
…
}
void keyboard(unsigned char key, int x, int y) {
int i = 0;
switch (key) {
case 'a':
std::cout << "KEY A PRESSED!!" << std::endl;
std::cout << "MOUSE X: " << x << std::endl;
std::cout << "MOUSE Y: " << y << std::endl;
break;
default:
break;
}
}
[ATTACH=CONFIG]2146[/ATTACH]