Quicktime will play most formats, but you will often need to download extra codecs for wmv, mpeg 2, divx, xvid, etc. So many codecs, it can be confusing. But once you have these, it is all easy - same with a pc, if you don't have a codec, it won't work.
More info needed if this is not the problem - but it sounds like you are coming in via usb, indicating a camera capture. Many of these use mpeg2, a codec for which apple charges $20. Screw that. Plenty of free tools and codecs are available, and now is a good time to pick up a few, and avoid those WTF moments. Once they are in your library/quicktime folder, it's all good from there on out.
http://www.divx.com <--this will play those great divx downloaded movies. One of the best quality codecs out there.
http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx <--This will play wmv files in quicktime or browser...
MPEG Streamclip is a powerful high-quality video converter, player, editor for MPEG, QuickTime, transport streams, iPod. And now it is a DivX editor and encoding machine, and even a stream and YouTube downloader.
You can use MPEG Streamclip to: open most movie formats including MPEG files or transport streams; play them at full screen; edit them with Cut, Copy, Paste, and Trim; set In/Out points and convert them into muxed or demuxed files, or export them to QuickTime, AVI, DV and MPEG-4 files with more than professional quality, so you can easily import them in Final Cut Pro, DVD Studio Pro, Toast 6, 7, 8, and use them with many other applications or devices.
Supported input formats: MPEG, VOB, PS, M2P, MOD, VRO, DAT, MOV, DV, AVI, MP4, TS, M2T, MMV, REC, VID, AUD, AVR, VDR, PVR, TP0, TOD, M2V, M1V, MPV, AIFF, M1A, MP2, MPA, AC3, ...
http://www.squared5.com/svideo/mpeg-streamclip-mac.htmlMoggie had good links - vlan is a must, as it will play most anything, and ffmpegx is a great front end gui for the ffmpeg transcoder.
Also, you should not have to use the keyboard's usb port - apple keyboards have a passthrough, with two ports - but it's often better to use the ones with power on the back or sides, depending on which imac you have...
Hope this helped - let us know, okay?