Keyboard Control HOWTO

Hi there,

I just started with Panda3D. After finishing the HelloWorld succesfully I want to move the Panda with the arrowkeys on my keyboard, but I cannot find anything about it. I prefer programming in C++.

I’m thinking of something comparable to that:

switch (keyboard.getCurrentKey.getID)
case LEFT:
//move left
case RIGHT:
// and so on…

Hi, welcome to the forums!

Take a look at this thread, this should cover your question:
[How do you detect keyboard input in C++?)

You can find more results when you search the forums for define_key.

thanks a lot, that’s what i need!