O'Reilly logo

Panda3D 1.6 Game Engine by Dave Mathews

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using keyboard events

By default, Panda3D ties events to every key on the standard keyboard. In fact, it ties two events to each key. The first event occurs whenever the key is pressed down, and the second happens when the key is released. Each of these events is named after the key it corresponds to. For all the keys that type characters, the event is named after that character. These are always lowercase, even when Shift is involved. Here are some examples:

"a", "b", "c", "[", "5"

The following event names won't work:

"A", "B", "C", "{", "%"

The event for releasing the key adds up to the end of the event name. For example:

"a-up", "[-up", "5-up"

There is also an event for the auto-repeat that occurs when a key is held down on the keyboard. This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required