The C++ page on keyboard support (https://docs.panda3d.org/1.10/cpp/programming/hardware-support/keyboard-support) has some Python code blocks that should be switched to C++ examples.