Can I use my keyboard as an input through the usb cable?

Why not write a sketch that receives characters from the serial monitor and acts on them?
You have to press enter for serial monitor to send them out.
That's pretty simple to implement.