The code you present seems to be part of a class “World” that you copied from some example. This class is nothing Panda3D gives to you. If you want to use a method “setkey” then you have to implement this method (or copy it from the example you used).
It should be something like:
def setkey( self, key, value ):
self.keyMap[ key ] = value
Oh, and watch the indention. This can never be valid python code:
I know, but I dont have physics up and running yet, just trying to learn how control works. With the jumping with positions I can get around some stuff (for fun, dont have collision up and running yet) + just testing out the accepting keys.
I do have following in the my code, I just forgot to put it in the set. I took the code from the Roaming-Ralph tut to use in my own code.