First thing I though of was to boot your mac in target disk mode - but you need to press the "t" key during the boot process to do that.
Then I thought to boot from the install CD, but you have to press the "c" key to do that...
The bluetooth keyboard you mention is probably a good way to go, provided you had bluetooth turned on before the USB stopped working. If you have file sharing turned on you could connect to the iMac over the network and get your files that way.
I'll have to think on that one more. In the meantime, keep trying, swap and jiggle ports, maybe try a PC keyboard?