if it is a wired keyboard simply unplug it from your iMac and plug it into any USB.
For a wired connection, connect a printer to your Chromebook with a USB cable. For example, to use Command-C (copy), press and hold the Command key, then the C key, then release both keys. Connect your controller to a Windows PC by using a USB cable, the Xbox Wireless Adapter for Windows. To use a keyboard shortcut, press and hold one or more modifier keys and then press the last key of the shortcut. Macally USB Wired Mouse with 3 Button, Scroll Wheel, & 5 Foot Long Cord, USB Mouse for Laptop and Desktop, Computer Mouse Compatible with Apple Macbook Pro.