All apologies for my (deleted) answer about USB using 5V logic. I had assumed this was the case, but when I went to check that I found this, which says high is <=3.6V and low is >=0.3V. I think this should be okay.
However, it also reads:
A USB device pulls one of the data lines high with a 1.5kO resistor. This overpowers one of the pull-down resistors in the host and leaves the data lines in an idle state called "J". The choice of data line indicates a device's speed support; full-speed devices pull D+ high, while low-speed devices pull D- high. In fact the data is transmitted by toggling the data lines between the J state and the opposite K state.
I am sure USB is a more complicated protocol than your code implements. Some initialization must take place. The keyboard is not simply a dumb serial device, but you have presumed plugging it in that way and hitting a key will cause the levels to shift. You will need to go through the specification to determine what is actually going to happen.
I would guess if the proper initialization does not occur, the device may simply leave the line high and not transmit keystrokes, etc. Notice if you plug a keyboard into a computer, it immediately recognizes it as a keyboard before you hit any keys. How does that happen? How does it know it is not a data stick or camera, etc? It's via the USB protocol, and you have not implemented it.