You can "write" or send data to any USB device. reading and writing data is required for USB to work, period. Negotiation is required unlike something more passive like RS-232 where you could just start sending data out of the blue in 3 wire mode.
Do keyboards have a nonvolatile memory you can write to? I haven't seen one you can write to, but there's nothing stopping you from making one that is writable. You could probably collected data on the keyboard with some crafty use of the scroll lock indicator, since this is set on the computer itself.
Unless it has a hub or enumerates at some other device, it will still just be a keyboard, or any weird flavot of a HID.
If you really want to test for a stuck key or other brokenness, boot a runtime linux and run the "showkey --scancodes" command. It will show what the keyboard is sending. Scan codes are completely different for USB than for PS/2 keyboards.
FWIW, the way linux and windows handle USB keyboards is different in odd ways. I've written keyboard emulators that worked fine with windows, but needed timing adjustments to work with linux. There are also variations in how various keyboards send data. Windows is real tolerant so there's no effective difference unless you're really looking for it.