Using an Apple Keyboard Dock as a keyboard for a computer?
It’s not possible to connect it to a Mac. The Apple Store detail page for this product says that it’s only compatible with the iPad. Note that the full product name is “iPad Keyboard Dock”.

Here are some ways you can use the iPad Keyboard Dock, though:


Connect the dock to your computer with the USB cable included with
your iPad to sync iPad and charge its battery.
Connect the dock to an electrical outlet using the iPad 10W USB Power Adapter (included with
your iPad) to charge the iPad battery.
Use the dock to hold your iPad
at the perfect angle to compose email and notes using the keyboard or
to watch your favorite videos or photo slideshows.
Connect the dock
to a TV or video projector using a compatible cable such as the iPad
Dock Connector to VGA Adapter or the Apple Component or Composite AV
Cable.
Connect the dock to a stereo or speakers using an AV cable or
a stereo audio cable to play music from iPad.