functions <keypad.h> ??

I will try to use them but the program does not compile properly.
For example I use this function: "char getKey () -Returns the key pressed That Is, if any. This function is non-blocking"
in this way:

char key = getKey ();

and so does not compile .. while the same function used in their example becomes:

char key = keypad.getKey ();

this is not the same thing. is not it? and why?