Do you know whether it's a USB keyboard? To find out, trace the cable from the keyboard to the back of the computer and see what kind of plug it has. If it's round, it's a PS2 keyboard so it's not the problem. If the plug is a flat rectangle, then it's a USB keyboard.
You can buy a USB to PS2 adapter. Lots of links to lots of places that sell them if you go to
www.google.com and do a search for USB to PS2 adapter.
Or you can go into the BIOS and enable USB support and see if that solves the problem.
To get into the BIOS, early on during the bootup process, watch for a screen that says "Press (x) to enter setup" (where (x) is the name of a key on the keyboard). Press that key (if you miss it the first time around, reboot and try again). Once into the BIOS, poke around for "USB support" and enable it. Don't change things randomly, though, or you'll be in bigger trouble than you are now.
Once you've found it (I can't give you any more specific directions since every BIOS is different), use the "Exit Saving Changes" option and let it continue booting. See if the keyboard will then let you choose Safe Mode when it gets to the Boot Menu.