Hi Mike,
Thank you for your help. I had indeed routed the PS2 data to LEDs and the values I got from the keyboard where the correct ones for all keys.
I'm sending attached the files. The descriptions are based on the Mr. Pong's book - FPGA Prototyping by VHDL Examples.
I created an output signal for each one of the extended keys - the up, left, right, down arrow keys and the alt-gr and ctrl keys.
As I said, it works perfectly with the Spartan-3E board. With the Basys-3 and Nexys-3 board, only the right arrow key and the alt-gr and ctrl keys work perfectly. The others no.