To stop it from starting X on login, do the following (my very according to your distro):
Note: You have to be root to acomplish the following, use the su command to login as root while logged in as another user
open the file /etc/inittab and goto the line "id:
X:initdefault:" where
X is a number, change this number to 3, save the file, and reboot.
If your keyboard won't allow you to get this far, then...
If your mouse works, open up the character map, its somewhere in the gnome menu. Then use it to copy and paste characters with your mouse. As for the keyboard, try typing "setup" (without quotes) in some console, there will be a keyboard option in the menu of the program when it comes up. I suggest only trying
setup if you can't fix it from Gnome, and login as text. You don't need X to use the
setup utility. If all else fails, you can try editing /etc/X11/XF86Config-4 (or /etc/X11/XF86Config if you don't have a "-4") directly. Hope I helped! Keep trying, and good luck!
Oh! By the way, you may want to make sure the mouse and keyboard are plugged in! That helps.